OperationalError: FATAL: Ident authentication failed for user “postgres”
来源:互联网 发布:雅思写作书籍推荐知乎 编辑:程序博客网 时间:2024/05/22 04:00
OperationalError: FATAL: Ident authentication failed for user “dbuser”
出现这个错误的原因还是在于上面pg_hba.conf 文件的设置,Debian系(包括ubuntu)默认的pg_hba.conf 文件对于localhost本地机器的数据库访问方式是ident,它指的是只有Linux shell用户通过同名的postgreSQL 用户才能访问,也就是pg超级用户postgres 只能由linux 用户postgres 登录后操作。要解决类似OperationalError: FATAL: Ident authentication failed for user “postgres”的问题,有两种解决方法:
1. 在执行$ python manage.py shell之前先$su postgres 切换为postgres 用户
2. 修改pg_hba.conf 的客户端访问设置,将laocal 的访问由ident 改为trust,如:
# TYPE DATABASE USER CIDR-ADDRESS METHOD
local all all trust
修改完pg_hba.conf设置记得重启pg。安装了pg_ctl 也可以用pg_ctl reload。
- OperationalError: FATAL: Ident authentication failed for user “postgres”
- psql: FATAL: Ident authentication failed for user “postgres”
- PostgreSQL: IDENT authentication failed for user postgres
- centos7解决django.db.utils.OperationalError: FATAL: Peer authentication failed for user "postgres"
- Postgres psql: FATAL: Peer authentication failed for user "xxx"
- CENTOS针对POSTGRES出现的POSTGRESQL IDENT AUTHENTICATION FAILED FOR USER
- psql -U myusername mydb 错误:psql: FATAL: Ident authentication failed for user "mypguser"
- 【Linux】psql: FATAL: Ident authentication failed for user "username" Error and Solution
- sysbench下面测试postgresql遇到IDENT authrntication failed for user postgres
- psql: FATAL: Peer authentication failed for user “xxx”
- pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
- Git fatal: Authentication failed for '***' 错误解决
- pgpool authentication with pgpool failed for user
- error:password authentication failed for user
- intellij idea git fetch failed fatal:Authentication failed for
- Git fatal: Authentication failed
- git clone 的时候 fatal: Authentication failed for "http://......"
- Github错误:fatal: Authentication failed for 'https://github.com/ ...
- Solr部署配置(二)中文分词设置
- 1.1 最长平台
- c# 测试IP是否连通
- 操作系统_再识(kobject,kset,子系统层次结构)
- 用tftp的方式在u_boot下 烧写uImage内核
- OperationalError: FATAL: Ident authentication failed for user “postgres”
- 安全运营(SOC)概述
- 关于list容器与vector容器中的erase操作
- 操作系统_再识(linux设备管理文件系统-devfs与udev)
- JpcapHandler——Jpcap抓包处理
- FBReader编译导入eclipse
- 在 Java 的泛型类型中使用通配符
- 使用Flume NG构建数据收集系统(第一部分 Flume介绍)
- 关于char转换成LPCWSTR的问题