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. pip安装scrapy时报错:error: Unable to find vcvarsall.bat

    网上一堆胡说八道的,请看微软官方文章: https://blogs.msdn.microsoft.com/pythonengineering/2016/04/11/unable-to-find-vcv ...

  2. java线程总结(1/5)

    前言 闲来无事正值面试,看面试中有线程之问题,特此总结一番. 正文 一.线程和进程的区别:1.每个进程都有独立的代码和数据空间(进程上下文),进程间的切换会有较大的开销.2.线程可以看成时轻量级的进程 ...

  3. IM开发基础知识补课(四):正确理解HTTP短连接中的Cookie、Session和Token

    本文引用了简书作者“骑小猪看流星”技术文章“Cookie.Session.Token那点事儿”的部分内容,感谢原作者. 1.前言 众所周之,IM是个典型的快速数据流交换系统,当今主流IM系统(尤其移动 ...

  4. javascript闭包传参就这么简单

    var query = (function (a) { return a; })('fx'); alert(query);

  5. mui 监听app运行状态

    <!doctype html> <html> <head> <meta charset="UTF-8"> <title> ...

  6. eclipse 编译JAVA 项目导入的WEB项目 无法编译问题

    右击你的项目 选择properties  ---->java Build Path--->Default output folder新建一个classes目录就好了 watermark/2 ...

  7. 《The Story of My Life》Introductiom - A Journey Of Discovery

    "I do not object to harsh criticism," said Helen Keller, "so long as I am treated lik ...

  8. CAS 与 无锁队列

    http://coolshell.cn/articles/8239.html http://www.tuicool.com/articles/VZ3IBv http://blog.csdn.net/r ...

  9. Manual close is not allowed over a Spring managed SqlSession(转)

    最近用junit测试spring项目的时候,报错: Manual close is not allowed over a Spring managed SqlSession 意思是不允许手动关闭spr ...

  10. hibernate 一对多关联

    package com.bjsxt.hibernate; import java.util.HashSet; import java.util.Set; import javax.persistenc ...