POSTGRESQL 9.1 FATAL: password authentication failed for user "postgres"
2013-12-11 10:21
495 查看
1.配置postgreql 可以远程访问:
sudo vim /etc/postgresql/9.1/main/postgresql.conf
root@ubuntuserver:~# sudo vi /etc/postgresql/9.1/main/postgresql.conf
—>改变行:#listen_addresses = ‘localhost’
—>修改为:listen_addresses = ‘*’
—>改变行:#password_encryption = on
—>修改为:password_encryption = on
root@ubuntuserver:~# sudo vi /etc/postgresql/9.1/main/pg_hba.conf—>文件末添加行:# to allow your client visiting postgresql server
—>文件末添加行:host all all 0.0.0.0 0.0.0.0 md5root@ubuntuserver:~# sudo /etc/init.d/postgresql-9.1 restart
2.修改默认的postgres 密码
sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password'
3.重启POSTGRESQL服务
sudo /etc/init.d/postgresql-9.1 restart
sudo vim /etc/postgresql/9.1/main/postgresql.conf
root@ubuntuserver:~# sudo vi /etc/postgresql/9.1/main/postgresql.conf
—>改变行:#listen_addresses = ‘localhost’
—>修改为:listen_addresses = ‘*’
—>改变行:#password_encryption = on
—>修改为:password_encryption = on
root@ubuntuserver:~# sudo vi /etc/postgresql/9.1/main/pg_hba.conf—>文件末添加行:# to allow your client visiting postgresql server
—>文件末添加行:host all all 0.0.0.0 0.0.0.0 md5root@ubuntuserver:~# sudo /etc/init.d/postgresql-9.1 restart
2.修改默认的postgres 密码
sudo -u postgres psql template1
ALTER USER postgres with encrypted password 'your_password'
3.重启POSTGRESQL服务
sudo /etc/init.d/postgresql-9.1 restart
相关文章推荐
- postgresql 9.1 kernel.shm 设置不当导致 FATAL: could not create shared memory segment
- postgresql Connection to database failed: FATAL: no pg_hba.conf entry for host "10.129.195.161", us
- centos7解决django.db.utils.OperationalError: FATAL: Peer authentication failed for user "postgres"
- Rails: could not connect to database postgres: FATAL: Peer authentication failed for user "username"
- Postgres psql: FATAL: Peer authentication failed for user "xxx"
- rails连接postgresql错误:psql: 致命错误: 用户 "postgres" Ident 认证失败
- 关于连接PostgreSQL时提示 FATAL: password authentication failed for user "连接用户名" 的解决办法
- PostgreSql:createdb -U postgres mydb 错误:createdb: could not connect to database postgres: FATAL: P
- postgresql: pg_ctl -D data start 出现 postgres aaaaaaaaaaaaaaaaaaaaaaaaa "C:/Users/huang zhen yang/dat
- centos7.2 postgresql 9.2 用户名登录 ‘psql: 致命错误: 用户 "postgres" Ident 认证失败’
- 解决createdb: could not connect to database postgres: FATAL: Peer authentication failed for user "postgres"
- linux 源码安装出现createdb: could not connect to database template1: FATAL: role "postgres" does not exis
- Installing "uuid-ossp" library in Postgres 9.1
- postgreSQL9.1忘记postgres用户密码怎么办
- git cherry-check error "fatal: bad object"
- PostgreSQL / GIST index require "LIMIT" clause to trigger the index.
- PostgreSQL return result "row by row" or "once all"? please see pg driver
- [PostgreSQL] Ensure Uniqueness in Postgres
- postgresql无法启动,事件查看器提示bogus data in lock file "postmaster.pid
- Parse Fatal Error at line 1 column 7: The processing instruction target matching "[xX][mM][lL]" is not allowed.