新建服务器出现错误 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 保 ...
随机推荐
- vue-router 重难点总结笔记
1,使用动态路由配置的(如:‘:id’),可以在this.$router.params.id获得. 官网例子: 模式 匹配路径 $route.params /user/:username /user/ ...
- python sheet写入数据
import pandas as pd from pandas import DataFrame import openpyxl from openpyxl import load_workbook ...
- javascript 对象数组排序(按照科目级次)
需求 从后台获取的数据是这样的 上帝要这样的 背景 从后台获取到表格数据,然后填充到excel.当然是用js来填充的.js 本身的数组具有sort()功能.但是是针对 ...
- maven 包下载地址
<groupId>cn.com.bmsoft.smartcity</groupId><artifactId>base</artifactId><p ...
- VI操作
[[ 开头]] 结尾[[^ 开头第一个字符]]$ 结尾最后一个字符 以下转载自:http://www.cnblogs.com/88999660/articles/1581524.html 进入vi的 ...
- c++中的两种getline用法
参考 https://blog.csdn.net/Big_laoshu/article/details/79345351
- win11.2.0.4lsnrctl status hang
以前听客户说监听日志大于4G,监听出现问题.本次另一个客户也出现这个问题,表现为监听lsnrctl start,status长久hang住 匹配mos WINDOWS: Listener Hangs ...
- 在c#中 RemoveAt、 Remove、delete用法区别
有三种方法可以删除 DataTable 中的 DataRow: Delete 方法和 Remove 方法和 RemoveAt 方法 其区别是: Delete 方法实际上不是从 DataTable 中删 ...
- python利用requests和threading模块,实现多线程爬取电影天堂最新电影信息。
利用爬到的数据,基于Django搭建的一个最新电影信息网站: n1celll.xyz (用的花生壳动态域名解析,服务器在自己的电脑上,纯属自娱自乐哈.) 今天想利用所学知识来爬取电影天堂所有最新电影 ...
- 基于webpack的react开发环境搭建新手教程
最近学习react-webpack项目搭建,找到一篇我认为不错的博客,跟着学习了一番,写得很详细很好,本篇博客纯属记录总结,要看更详细的搭建过程及解析,请戳: 基于webpack的React项目搭建( ...