我在Ubuntu 14.04中使用PostgreSQL 9.3并且我总是使用此过程来访问psql:
sudo -i -u postgres
psql
到现在为止它返回:
psql: FATAL: password authentication failed for user "postgres"
password retrieved from file "/var/lib/postgresql/.pgpass"
/var/lib/postgresql/.pgpass 的内容为:
*:*:*:postgres:Vdjui6OTF6ab3Jzf77dVeOa88t7OdK
*:*:*:vmail:pxrw23PsaJOBDfZxIcImhAkzUzH4cA
*:*:*:vmailadmin:6XLhFMc5KWYpdXGE7TCfCHZSDkqzXJ
*:*:*:iredapd:5D6Yl2iRu56Dma2uRXDGSAP89JQQHE
*:*:*:iredadmin:xklX0IgJOQVGklDNFlLckPznq5L7ZG
*:*:*:sogo:PZdclHCua2Ip10yddVw4odSjr0dfZk
*:*:*:roundcube:kByuTSkilZWglYzv24unwfenUZkR7u
*:*:*:amavisd:UEBpiDEvsIbogEB5stJl1YP8DvMCWZ
答案 0 :(得分:0)
我解决了!我在终端输入了这个:
psql -U postgres
然后输入我的密码