/var/lib/pgsql/9.2/data/pg_hba.conf

打开之后找到

local   all             postgres/all                                peer

改成

local   all             postgres                                trust

保存之后重新加载文件

sudo /etc/init.d/postgresql reload

Rails: could not connect to database postgres: FATAL: Peer authentication failed for user "username"的更多相关文章

  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. pgadmin3 新建服务器出现错误 Peer authentication failed for user "postgres" 的解决办法

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

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

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

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

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

  5. POSTGRESQL 9.1 FATAL: password authentication failed for user "postgres"

    1.配置postgreql 可以远程访问: sudo vim /etc/postgresql/9.1/main/postgresql.conf root@ubuntuserver:~# sudo vi ...

  6. fatal: Authentication failed for “someurl”

    一.前言 我们在公司做项目,很多时候会遇到这个问题:Git failed with a fatal error. Authentication failed for ‘ http// xxx..... ...

  7. greenplum全量恢复gprecoverseg -F出现Unable to connect to database时的相关分析及解决方法

    之前有两位朋友碰到过在对greenplum的系统构架更改后,出现全量恢复gprecoverseg -F也无法正常执行的情况. 报错信息为Unable to connect to database. R ...

  8. UBUNTU下MONGODB出现PHP Fatal error: Uncaught exception 'MongoConnectionException' with message 和 Authentication failed on database 'admin' with username

    MONGO 远程连接服务器,出现: PHP Fatal error: Uncaught exception Stack trace:# /var/www/data/update_data.php(): ...

  9. Connect to Database Using Custom params链接数据库配置参数说明

    使用RF的关键字Connect to Database Using Custom params链接数据库,对应的参数说明: a)     第一个参数我使用的是cx_Oracle,就写这个 b)     ...

随机推荐

  1. 解决:ADODB.Stream 错误 '800a0bbc' 写入文件失败

    重装更改目录为e盘后,上传文件出现问题.解决方法: 调用adodb.stream的savetofile方法时发生错误, ADODB.Stream 错误 800a0bbc 写入文件失败.(msxml3. ...

  2. Microsoft Word 2010/2013 无法创建工作文件 请检查临时环境变量

    解决方案:重置IE缓存文件夹

  3. Single Pattern(单例模式)

    单例模式是一种常用的软件设计模式.通过单例模式可以保证系统中一个类只有一个实例而且该实例易于外界访问,从而方便对实例个数的控制并节约系统资源.如果希望在系统中某个类的实例只能存在一个,单例模式是最好的 ...

  4. 避免使用jQuery的html方法来替换标签,而是使用replaceWith方法

    tblCostSplit.html内容: <nobr title="">只想显示里面内容,去掉nobr标签</nobr> <nobr title=&q ...

  5. 远程执行命令和文件分发shell脚本

    deploy.conf node01,all,other,datanode,journalnode,zookeeper, node02,all,other,datanode,journalnode,z ...

  6. 【转】微信公众开发URL和token填写详解

    很多人不明白微信公众号开发者中心服务器配置里面的url和token是什么,不会填写.看了教程也不理解是什么,本文详述一下这个问题. 第一步:作为一名微信公众号开发者,别人进入你的微信公众号,肯定会看见 ...

  7. 【scala】 scala 类 (五)

    1.scala类 1.class 关键字 2.var 属性 默认生成getter/setter 方法 3.val 属性 默认生成getter 方法 4. 自定义getter /setter 方法 , ...

  8. Python对象(上)

    Python是一门面向对象的语言,在Python中一切都是对象,函数是对象,类型也是对象. 下面就看看Python中对象相关的内容. Python对象基本概念 Python对象有三个基本的要素: 身份 ...

  9. Git Step by Step – (8) Git的merge和rebase

    前面一篇文章中提到了"git pull"等价于"git fetch"加上"git merge",然后还提到了pull命令支持rebase模式 ...

  10. ios开发之--跳转到指定的TabBarViewController中的某一个VIewController

    比较简单,也很实用,方法大同小异,仅做记录,方法的系统记录如下: [self dismissViewControllerAnimated:YES completion:^{ // 这是从一个模态出来的 ...