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 md5
root@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 FATAL: password authentication failed for user "postgres"的更多相关文章

  1. pg_dump: [archiver (db)] connection to database “dbase” failed: FATAL: Peer authentication failed for user “postgres”

    "Peer authentication" means that it's comparing your database username against your Linux ...

  2. (转载)postgresql navicat 客户端连接验证失败解决方法:password authentication failed for user

    命令:su - postgres CREATE USER foo WITH PASSWORD 'secret'; ==================== 1.2个配置修改 postgresql.co ...

  3. 【解决】Git failed with a fatal error. Authentication failed for ‘http://......’

    今天在visual studio中运行项目,打算pull最新的代码的时候,报错: Git failed with a fatal error. Authentication failed for ‘h ...

  4. pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法

    转自:http://blog.csdn.net/tingyuanss/article/details/43763899 用pgadmin3 新建服务器出现错误 Peer authentication ...

  5. 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法

    用pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 在stackoverflow上找到答案,出现此 ...

  6. Rails: could not connect to database postgres: FATAL: Peer authentication failed for user "username"

    /var/lib/pgsql/9.2/data/pg_hba.conf 打开之后找到 local all postgres/all peer 改成 local all postgres trust 保 ...

  7. 【docker】启动docker连接数据库 出现FATAL: password authentucation failed for user "homestatead"问题

    docker可以成功启动,启动命令如下: docker run -d -p : -v `pwd`/pgdata:/var/lib/postgresql/data -e POSTGRES_USER=ho ...

  8. SecureCRT使用SSH链接出现Password Authentication Failed,Please verify that the username and password are correct的解决办法(亲测有效)

  9. linux-centos-pgsql-Ident authentication failed for user “postgres”错误出现解决方法

    首先,要找到pg_hba.conf\ -->cd /var/lib/pgsql/data -->vi pg_hba.conf 然后,将里面的配置文件修改如下: # TYPE DATABAS ...

随机推荐

  1. 二、ELKStack集群架构设计

    一.ELKStack介绍与入门实践 二.Elasticsearch 集群架构图 服务器配置:Centos6.6 x86_64 CPU:1核心 MEM:2G (做实验,配置比较低一些) 注:这里配置el ...

  2. django admin后台接入tinymce并且支持图片上传

    首先:下载tinymce 地址是https://www.tinymce.com/ 点击download 下载社区版本即可 接着:把压缩包内tinymce目录内的所有文件和文件夹复制到Django项目中 ...

  3. Oracle imp关于fromuser 和 touser的用法

    fromuser就是把当前的dmp文件中的某一个用户下的数据取出.touser就是把现在dmp文件中的数据导入到目标库的指定user下.具体命令这样.exp userid=system/manager ...

  4. 从项目上一个子查询扩展学习开来:mysql的查询、子查询及连接查询

    上面这样的数据,想要的结果是:如果matchResult为2的话,代表是黑名单.同一个softId,version,pcInfoId的代表是同一个软件,需要去重:同时,如果相同软件里面只要有一个mat ...

  5. java 利用JAX-RS快速开发RESTful 服务实例

    首先看web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns=" ...

  6. phpcms的后台网站直接访问正常,百度快照收录链接访问跳转到非法网站

    问题:    phpcms制作的网站直接访问正常,百度快照收录链接访问跳转到非法网站 百度快照收录网站域名,访问时自动跳转到一个非法网站 检查静态页index.html,index.php 网页内引用 ...

  7. Java 根据IP获取地址

    用淘宝接口:(源码:java 根据IP地址获取地理位置) pom.xml: <!-- https://mvnrepository.com/artifact/net.sourceforge.jre ...

  8. centos6.8服务器配置之MYSQL配置

    1.rpm安装方式顺序: 下载: wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-community-server-5.7.19-1. ...

  9. java实现归并排序算法

    归并排序算法思想:分而治之(divide - conquer);每个递归过程涉及三个步骤第一, 分解: 把待排序的 n 个元素的序列分解成两个子序列, 每个子序列包括 n/2 个元素.第二, 治理: ...

  10. 解决tomcat提交的数据乱码的问题

    有时,开发过程中会遇到前端传入“中文”并返回时,会出现乱码!主要是因为前端通过tomcat7提交的数据就出现了乱码的问题,也就说根源在于tomcat7. 有2中方案解决该问题: (1)使用tomcat ...