当前位置:Gxlcms > 数据库问题 > PostgreSQL提示:‘psql: FATAL: ”Peer authentication failed for user ”postgres“’错误

PostgreSQL提示:‘psql: FATAL: ”Peer authentication failed for user ”postgres“’错误

时间:2021-07-01 10:21:17 帮助过:8人阅读

PostgreSQL提示:‘psql: FATAL: ”Peer authentication failed for user ”postgres“’错误

 

#将文件Database administrative 下列中的peer改为trust
$sudo nano /etc/postgresql/10/main/pg_hba.conf
#重新加载配置
$sudo /etc/init.d/portgresql reload
#peer(不可信),trust(可信),md5(加密)

-bash-4.2$ pwd
/var/lib/pgsql/11/data
-bash-4.2$
-bash-4.2$
-bash-4.2$ ls -rlt postgre*
-rw-------. 1 postgres postgres 88 Jun 18 11:27 postgresql.auto.conf
-rw-------. 1 postgres postgres 23863 Jun 18 12:01 postgresql.conf

PostgreSQL提示:‘psql: FATAL: ”Peer authentication failed for user ”postgres“’错误

标签:mini   sudo   nano   nan   str   pwd   bash   The   data   

人气教程排行