LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1749|回复: 4

ubuntu6.06 server 上postgresql不能访问

[复制链接]
发表于 2006-11-3 21:01:01 | 显示全部楼层 |阅读模式
采用6.06 server版,一开始用postgresql8.1,没什么问题。后来
sudo apt-get remove postgresql-8.1,
sudo apt-get install postgresql-7.4,
没出错。
sudo /etc/init.d/postgresql-7.4 start
也没报错。但
sudo -u postgres sh
createdb test
就报:
createdb:could not connect to database postgres:could not connect to server:No such file or directory
  Is the server running locally and accepting
  connection on Unix domain socket "/tmp/.s.PGSQL.5432"?
发表于 2006-11-13 21:23:42 | 显示全部楼层
你要修改pg_hda.conf文件,设置连接方式
回复 支持 反对

使用道具 举报

发表于 2006-11-18 21:54:28 | 显示全部楼层
pg_hda.conf中的是客户端验证设置。

有几种可能性,PostgreSQL没有启动;PostgreSQL启动、但没有打开监听端口;Server和Port读没有问题,客户端验证有问题。

你的情况,先用netstat检查一下,PostgreSQL的5432端口是否已处于监听状态。也要看一下,有没有PostgreSQL的进程在运行。看看问题到底在哪里。
回复 支持 反对

使用道具 举报

发表于 2006-11-25 16:25:16 | 显示全部楼层
ncowboy@geisha:~> su -c "netstat -npl|grep 5432"
ãä:
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      7163/postmaster
tcp        0      0 ::1:5432                :::*                    LISTEN      7163/postmaster
unix  2      [ ACC ]     STREAM     LISTENING     29658  7163/postmaster     /tmp/.s.PGSQL.5432
ncowboy@geisha:~>
回复 支持 反对

使用道具 举报

发表于 2006-12-8 13:04:44 | 显示全部楼层
telnet一下就知道了.
能连上的话再检查认证文件
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表