postgresql安装后链接报错psql: FATAL: Ident authentication failed for user “postgres“
postgresql 安装成功后,使用链接语句链接
[root@iZbp1hdum7hefdeb75mnyfZ ~]# psql -d postgres -U postgres -W
Password for user postgres:
psql (9.6.24)
Type "help" for help.postgres=#
postgres=#
postgres=#
这样链接并没有报错,但是这样登录就会报错误
[root@iZbp1hdum7hefdeb75mnyfZ ~]# psql -hlocalhost -d postgres -U postgres -W
Password for user postgres:
psql: FATAL: Ident authentication failed for user "postgres"
[root@iZbp1hdum7hefdeb75mnyfZ ~]# psql -h127.0.0.1 -d postgres -U postgres -W
Password for user postgres:
psql: FATAL: Ident authentication failed for user "postgres"
Navicat的远程链接也会报错Ident authentication failed for user “postgres”
修改
vim /var/lib/pgsql/9.6/data/pg_hba.conf
将IPv6等注释掉
# TYPE DATABASE USER ADDRESS METHOD# "local" is for Unix domain socket connections only
local all postgres md5
# IPv4 local connections:
#host all all 127.0.0.1/32 ident
host all all 0.0.0.0/0 md5
host replication replica 10.29.0.0/16 md5# IPv6 local connections:
#host all all ::1/128 ident
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication postgres peer
#host replication postgres 127.0.0.1/32 ident
#host replication postgres ::1/128 ident
重新启动postgresql
systemctl restart postgresql-9.6.service
再次链接就好用了
[root@iZbp1hdum7hefdeb75mnyfZ ~]# psql -h localhost -p 5432 -U postgres
Password for user postgres:
psql (9.6.24)
Type "help" for help.postgres=#
postgresql安装后链接报错psql: FATAL: Ident authentication failed for user “postgres“相关推荐
- OperationalError: FATAL: Ident authentication failed for user “postgres”
OperationalError: FATAL: Ident authentication failed for user "dbuser" 出现这个错误的原因还是在于上面pg_h ...
- PostgreSQL提示:‘psql: FATAL: ”Peer authentication failed for user ”postgres“’错误#将文件Database administ
#将文件Database administrative 下列中的peer改为trust $sudo nano /etc/postgresql/10/main/pg_hba.conf #重新加载配置 $ ...
- postgresql 开启远程访问、postgre设置开机自启动、psql: error: FATAL: Peer authentication failed for user “postgres“
文章目录 一.psql: error: FATAL: Peer authentication failed for user "postgres" 二.postgresql 开启远 ...
- 【PostgreSQL】FATAL: Ident authentication failed for user
问题描述 项目部署在服务器上(数据库postgresql同样是安装在该服务器上),启动时发现报错,org.postgresql.util.PSQLException: FATAL: Ident aut ...
- FATAL: password authentication failed for user postgres
FATAL: password authentication failed for user "postgres" 致命:用户"postgres"的密码验证失败 ...
- VS2017链接报错:fatal error LNK1318: 非意外的 PDB 错误
今天编译的时候出现了 : fatal error LNK1318: 非意外的 PDB 错误: NOT_IMPLEMENTED (9) 找了很久,后来对比sample里面的配置选项,终于解决问题: 中 ...
- 解决win7 64位操作系统下安装PL/SQL后连接报错问题: make sure you have the 32 bits oracle client installed
解决win7 64位操作系统下安装PL/SQL后连接报错问题: make sure you have the 32 bits oracle client installed 参考文章: (1)解决wi ...
- xshell进行ssh链接报错“所选的用户密钥未在远程主机上注册”处理
xshell进行ssh链接报错"所选的用户密钥未在远程主机上注册"处理 一.报错情况 二.控制台登录主机 三.解决步骤 1.重新生成公私钥 2./root/.ssh/authori ...
- VS Code远程链接报错Could not establish connection to “hz-t2.matpool.com”
VS Code远程链接报错Could not establish connection to "hz-t2.matpool.com" 输出的部分内容 ## 解决方法1 git fo ...
最新文章
- unknown type name 'uint32_t'
- Multi-Temporal SAR Data Large-Scale Crop Mapping Based on U-Net Model(利用U-net对多时相SAR影像获得作物图)...
- 卸载vuecli3_卸载vue2.0并升级vue_cli3.0的实例讲解
- 学学python(4):面向对象及类,模块
- .NET Core 3.0 中的数据库驱动框架 System.Data
- Akamai “三驾马车”,如何应对疫情后新场景形态下的新考验?
- 产品经理需要掌握的9种共性推荐策略
- arcengine 图层中节点抽稀功能(c++)
- JAVA实现图的邻接表以及DFS
- 统计自然语言处理基础——学习摘要(1)
- rup软件测试案例,胖子说RUP - 软件测试网 _领测软件测试网站-中国软件测试技术第一门户...
- JavaWebDay13_课程回顾,Tomcat软件,Servlet入门.
- Micro-personnel部署
- 2018界面情感化设计,拒绝冷冰冰的人机交流
- 详细讲解Java整数类型
- shell小实验详解1——for循环语句实现求奇数和与偶数和+小技巧使用!!!
- Android十大开源框架
- Hook DirectX 在War3 魔兽争霸界面写屏
- android 浏览器控件
- 编辑出库单issue