$ psql -U peimsmdata -h 127.0.0.1 peimsm
創(chuàng)新互聯(lián)自2013年起,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目網(wǎng)站制作、網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元鶴壁做網(wǎng)站,已為上家服務(wù),為鶴壁各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:18980820575
could not change directory to "/root"
Password for user peimsmdata:
psql (9.2.23, server 9.6.3)
WARNING: psql version 9.2, server version 9.6.
Some psql features might not work.
Type "help" for help.
原因:
雖然系統(tǒng)安裝了9.6版本的pgsql,但是psql這個(gè)腳本卻引用了舊的版本。
解決方法:
替換系統(tǒng)中舊版本的psql腳本為新的版本。
$ psql --version
could not change directory to "/root"
psql (PostgreSQL) 9.2.23
# which -a psql
/usr/bin/psql
/usr/local/postgresql/bin/psql
/bin/psql
# mv /usr/bin/psql /usr/bin/psql.bak
# ln -s /usr/local/postgresql/bin/psql /usr/bin/psql
$ psql -U peimsmdata -h 127.0.0.1 peimsm
could not change directory to "/root": Permission denied
Password for user peimsmdata:
psql (9.6.3)
Type "help" for help.