Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL

来源:百度知道 编辑:UC知道 时间:2024/06/07 01:20:49
Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "192.168.1.145", user "net114r4", database "net114r4" . in e:\www\www\connpg.php on line 2
NON

这是为什么??

无法联接到服务器:
查看有没有那个文件或目录 服务器是否在本地运行并且在Unix 域套接字 "/tmp/.s.PGSQL.5432"上准备接受联接
用postgres用户访问的吗?
不是的话,请转为postgres
su postgres ;
/usr/local/pgsql/bin/createdb test;
/usr/local/pgsql/bin/pslq test;
其他方法请参考http://www.linux999.org/html_sql/14/45824.htm