繁体   English   中英

Openerp无法连接到Postgresql数据库

[英]Openerp cannot connect to postgresql database

我的服务器是Centos 6.4 64位,ip 192.168.7.4,已安装postgresql-server-8.4.20-1.el6_5.x86_64。

[root@backup soft]# netstat -tupln | grep 5432
tcp        0      0 0.0.0.0:5432                0.0.0.0:*                   LISTEN      27533/postmaster
tcp        0      0 :::5432                     :::*                        LISTEN      27533/postmaster

我通过运行“ python setup.py install”安装了Openerp 7.0,在postgresql中创建了数据库“ openerp”。 当我尝试通过Web浏览器访问192.168.7.4:8069时,它显示错误““致命:用户\\” openerp \\“的身份验证失败”我无法在postgresql中登录openerp db:

psql -d openerp -U openerp -W
Password for user openerp:
psql: FATAL:  Ident authentication failed for user "openerp"

我确定密码与/etc/openerp-server.conf相同

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = openerp
db_password = *********

这是我的/var/lib/pgsql/data/pg_hba.conf

local   all         all                               ident
host    all             all     127.0.0.1/32            ident
host    all         all         192.168.7.4/32          ident

还有一个问题,我如何才能完全删除openerp? 我想重新安装openerp。 谢谢。

请尝试按照以下说明重设openerp用户的密码:

sudo su - postgres

之后输入root用户的密码,然后输入psql并编写以下查询:

ALTER USER openerp WITH PASSWORD '<fill with wathever password you want>';

并尝试使用新密码运行openerp。


对于openerp的执行,我不确定您运行openerp的命令。 对我来说,我正在使用此命令:

python openerp-server -r <db_user> -w <password_db_user>  

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM