新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
用pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres"
在stackoverflow上找到答案,出现此错误的原因是:
Peer authentication 是默认的配置,如果你的计算机用户名和你的postgres数据库名是一样的话,那么就不会出现此错误,不需要为你的数据库设置密码。
还有一种md5 authentication,它需要密码。
而我的计算机用户名和我的数据库名不一致,所以需要把Peer authentication改成md5 authentication,然后给数据库设置密码。
在哪里改?
/etc/postgresql/9.3/main/pg_hba.conf
执行命令
找到下面的一行:
local all postgres peer
改成
local all postgres md5
然后restart postgresql server
sudo service postgresql restart
新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法的更多相关文章
- pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法
转自:http://blog.csdn.net/tingyuanss/article/details/43763899 用pgadmin3 新建服务器出现错误 Peer authentication ...
- 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 ...
- CAS (10) —— JBoss EAP 6.4下部署CAS时出现错误exception.message=Error decoding flow execution的解决办法
CAS (10) -- JBoss EAP 6.4下部署CAS时出现错误exception.message=Error decoding flow execution的解决办法 jboss版本: jb ...
- JVM 崩溃 Failed to write core dump解决办法 WINDOWS
JVM 崩溃 Failed to write core dump解决办法 WINDOWS MIT key words: JVM,崩溃,windows,Failed,core dump,虚拟内存 最近从 ...
- 【转载】Android Gradle Build Error:Some file crunching failed, see logs for details解决办法
Android Gradle Build Error:Some file crunching failed, see logs for details解决办法 转载请标明出处: http://www. ...
- 远程连接MySQL错误“plugin caching_sha2_password could not be loaded”的解决办法
远程连接MySQL错误"plugin caching_sha2_password could not be loaded"的解决办法 问题描述: 今天在阿里云租了一个服务器,当我用 ...
- Authentication token manipulation error报错解决办法
Authentication token manipulation error报错解决办法 #参考http://blog.163.com/junwu_lb/blog/static/1916798920 ...
- mongodb 错误 SCRAM-SHA-1 authentication failed for --转
log 日志错误信息 2018-10-24T16:14:42.244+0800 I NETWORK [initandlisten] connection accepted from 192.168.1 ...
- 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 保 ...
随机推荐
- 使用SQL语句操作数据
一.SQL 结构化查询语言 1.T-SQL 和 SQL的关系 T-SQL是SQL的增强版 2.SQL的组成 2.1 DML (数据操作语言) 增加,修改,删除等数据操作 2.2 DCL (数据控制语言 ...
- 2017-10-5模拟赛T2 小Z爱排序(sorting.*)
Description Solution 比赛时找到了规律,但是没有证出来……(当然最后还是AC了……) 显然没有被操作的数在排好序的序列中一定是连续的一段. 所以,没有被操作的数一定从左到右连续地递 ...
- excel2013 打开为灰色空白 左下角显示就绪 要把文件拖进去才能打开!
最近电脑excel2013 打开总是为灰色空白 左下角显示就绪 要把文件拖进去或者在此再打开一个才能打开! 在网上搜了一下,我是使用下面这个方法解决的: 步骤一:请您在“开始”菜单的搜索框中输入“re ...
- javascript 禁用 右键 按键 禁用开发者工具
var h = window.innerHeight,w=window.innerWidth; //禁用右键 (防止右键查看源代码) window.oncontextmenu=function(){ ...
- 电脑小知识-win10
设置开机自启 一直想设置几个软件开机自启,尤其是文件搜索类和截图软件,不然每次打开电脑都要双击好几个工具,下面就记录一下如何设置开机自启. 1.先打开咱们的任务管理器,看看都有什么是开机自启的: 可以 ...
- Excel 常用属性的一小部分
1.由于工作需要,最近积累了一些Excel中的相关知识,特此记录 Workbooks xlbooks = xlApp.Workbooks; Workbook xlbook = xlbooks.Add( ...
- 解决tomcat同时部署两个SpringBoot应用提示InstanceAlreadyExistsException
问题描述:Caused by: javax.management.InstanceAlreadyExistsException: com.alibaba.druid.pool:name=primary ...
- git教程:删除文件
在Git中,删除也是一个修改操作,我们实战一下,先添加一个新文件test.txt到Git并且提交: $ git add test.txt $ git commit -m "add test. ...
- SpringBoot实现跨域
一.什么是跨域请求? 跨域请求,就是说浏览器在执行脚本文件的ajax请求时,脚本文件所在的服务地址和请求的服务地址不一样.说白了就是ip.网络协议.端口都一样的时候,就是同一个域,否则就是跨域.这是由 ...
- 自定义EL函数(以将字母转为大写为例)
Step1 定义一个类:StringFunction.java 主要作用是来提供转大写的方法; public class StringFunction { public static String t ...