古詩詞大全網 - 四字成語 - Warning: pg_connect(): Unable to connect to PostgreSQL server: FATAL

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

無法聯接到服務器:

查看有沒有那個文件或目錄 服務器是否在本地運行並且在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