【问题标题】:ROR + PgAdmin + psql: FATAL: role "user1234" does not existROR + PgAdmin + psql:致命:角色“user1234”不存在
【发布时间】:2013-05-21 03:56:34
【问题描述】:

在我的示例项目中,我正在尝试创建 postgre 数据库。在运行 rake db:create 时,我收到了一些奇怪的消息并且无法创建数据库。

user1234@ubuntu:~/Development/example$ psql -d postgres
psql: FATAL:  role "user1234" does not exist
user1234@ubuntu:~/Development/example$ psql -d postgres -U postgres
Password for user postgres: 
psql: fe_sendauth: no password supplied
user1234@ubuntu:~/Development/example$ psql -d postgres -U postgres
Password for user postgres: 
psql: FATAL:  password authentication failed for user "postgres"

请建议我,解决此问题并使我的示例项目处于运行状态的下一步是什么。

【问题讨论】:

    标签: postgresql ruby-on-rails-3.2


    【解决方案1】:

    您似乎只在pg_haba.conf 文件中设置了对等标识

    在你的 Ubuntu shell 中尝试

    sudo su postgres
    psql
    

    这些相关问题下的更多信息:
    PostgreSQL error: Fatal: role "username" does not exist
    pgadmin gives me the error: no password supplied
    Run batch file with psql command without password

    【讨论】:

    • 非常感谢您的宝贵反馈。但经过一番努力,我又增加了一个用户并添加到 config.yml 现在它工作正常。
    【解决方案2】:

    经过长时间的战斗和大量的 RnD,我决定从 pgAdmin 发给 create one more user for postgres

    【讨论】:

      猜你喜欢
      • 2015-03-28
      • 2013-02-24
      • 2018-02-18
      • 1970-01-01
      • 2017-03-08
      • 2014-03-15
      • 1970-01-01
      相关资源
      最近更新 更多