pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
来源:互联网 发布:疯狂java讲义 下载 编辑:程序博客网 时间:2024/06/09 20:53
用pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres"
在stackoverflow上找到答案,出现此错误的原因是:
Peer authentication 是默认的配置,如果你的计算机用户名和你的postgres数据库名是一样的话,那么就不会出现此错误,不需要为你的数据库设置密码。
还有一种md5 authentication,它需要密码。
而我的计算机用户名和我的数据库名不一致,所以需要把Peer authentication改成md5 authentication,然后给数据库设置密码。
在哪里改?
/etc/postgresql/9.3/main/pg_hba.conf
执行命令
找到下面的一行:
local all postgres peer
改成
local all postgres md5
然后restart postgresql server
sudo service postgresql restart
0 0
- pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
- Postgres psql: FATAL: Peer authentication failed for user "xxx"
- centos7解决django.db.utils.OperationalError: FATAL: Peer authentication failed for user "postgres"
- CENTOS针对POSTGRES出现的POSTGRESQL IDENT AUTHENTICATION FAILED FOR USER
- PostgreSQL: IDENT authentication failed for user postgres
- psql: FATAL: Peer authentication failed for user “xxx”
- OperationalError: FATAL: Ident authentication failed for user “postgres”
- psql: FATAL: Ident authentication failed for user “postgres”
- testsaslauthd出现0: NO "authentication failed"错误提示的解决办法
- pgpool authentication with pgpool failed for user
- error:password authentication failed for user
- psql -U myusername mydb 错误:psql: FATAL: Ident authentication failed for user "mypguser"
- 邮件发送出现错误:535 Authentication failed
- Git fatal: Authentication failed for '***' 错误解决
- 【OpenStack】SSH登录虚拟机出现"Read from socket failed: Connection reset by peer"问题的解决办法
- 【OpenStack】SSH登录虚拟机出现"Read from socket failed: Connection reset by peer"问题的解决办法
- 出现<authentication mode="Windows"/>错误解决办法
- 出现<authentication mode="Windows"/>错误解决办法
- MySQL的安装
- appium+eclipse搭建手机自动化测试开发环境
- CoreGraphics详解
- Hibernate框架简述
- Apache Camel with SQL Example
- pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
- 回归测试
- gdbserver远程调试
- CentOS python版本的升级 从2.6 到2.7
- 与CPN Tools兼容的着色Petri网的C++运行引擎——CPetriNet
- Django forms.Form自定义方法注意事项
- Java抓取网页数据(原网页+Javascript返回数据)
- IOS单例模式(Singleton)
- java中调用weka