postgresql如何登录
2023-04-18 14:24:28 时间
postgresql登录失败的解决方法:
确认phpPgAdmin是否可以链接到postgresql数据库,方法:查看data/pg_log下的log有没有phpPgAdmin的访问记录,有则说明可以
链接。
推荐:postgresql教程
查看postgresql的认证方法:pg_hba.conf
# "local" is for Unix domain socket connections only local all all ident # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5
看着好像跟ident认证方式有点关系,最后在官方文档找到一句话:
When using an external authentication system like Ident or GSSAPI, the name of the operating system user that initiated the connection might not be the same as the database user he needs to connect as.
明白了,原来上面的[local all all ident]搞的鬼,如果是ident的话需要配置 pg_ident.conf文件,所以果断换成除以上两种
加密方式外的方法
重启postgresql:
#service postgresql restart.
再访问一次,成功。
更多技术请关注Python视频教程。
相关文章
- SpringBoot怎么自定义一个Starter
- 关于pacemaker-Cluster-节点的维护模式的功能介绍
- 【ctf权威竞赛指南笔记】(1)CTF
- 【持续更新中】开源贡献记录
- 自制肥牛卷
- 现代农业|AIRIOT智慧农业管理解决方案
- 做一个“不那么差”的程序员,有多难?
- 【交互式用户流程与演示设计】上海道宁与Overflow让您能更自信的展示您的设计
- Docker-harbor私有仓库
- 【Swiper】Swiper 滚动插件在 vue3 的使用,并手动设置左右切换
- 统信 UOS 重置Root账号密码 获取 Root 权限
- 一文详解TensorFlow模型迁移及模型训练实操步骤
- 【秒杀】NTP时钟同步让秒杀成毫秒微秒纳秒杀
- 京东一面:20种异步,你知道几种?含协程
- ChatGPT可能的影响与机会
- Hugging News #0203: 3.3 MB 的文生图模型、RHLF 训练框架、手机上能跑的 Transformer
- drools规则动态化实践
- (笔记)【NTP系列:07】NTP时间同步配置总结:Windows(W32Time)作为NTP时钟源服务端,Linux作为客户端
- 路由架构(一)
- 谈刻意练习 Talking about deliberate pratise