在使用如下命令打開PostgreSQL
psql -U postgres
提示psql: 致命錯誤: 對用戶"postgres"的對等認證失敗
使用如下命令找到postgreSQL的配置文件,vi進入該文件進行修改
find / -name pg_hba.conf 或者 locate pg_hba.conf
將peer改為MD5
然后重啟服務:
service postgresql restart
或者:
systemctl restart postgresql
在使用如下命令打開PostgreSQL
psql -U postgres
提示psql: 致命錯誤: 對用戶"postgres"的對等認證失敗
使用如下命令找到postgreSQL的配置文件,vi進入該文件進行修改
find / -name pg_hba.conf 或者 locate pg_hba.conf
將peer改為MD5
然后重啟服務:
service postgresql restart
或者:
systemctl restart postgresql
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。