PG :: ConnectionBad:严重:用户"alphauser"的密码身份验证失败 [英] PG::ConnectionBad: FATAL: password authentication failed for user "alphauser"

查看:74
本文介绍了PG :: ConnectionBad:严重:用户"alphauser"的密码身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的大学在Rails中开发一个应用程序.该应用程序是由前一年的学生启动的,现在是我和我的同事继续进行该应用程序.我从github上获取了该应用程序,我运行了bundle install,但是当运行rake db:migrate时,我得到了这个PG::ConnectionBad: FATAL: password authentication failed for user "alphauser". 在database.yml中,我有这些

I'm working on an application in Rails for my college. The application was started by the students from previous year and now it's me and my colleagues turn to continue work on it. I took the application from github, I run bundle install, but when to run rake db:migrate I got this PG::ConnectionBad: FATAL: password authentication failed for user "alphauser". In database.yml I have these

 development:
  adapter: postgresql
  encoding: unicode
  database: alpha_database
  host: localhost
  pool: 5
  username: alphauser
  password: alphapassword

在这种情况下,我不知道该怎么办.

I don't know what to do in this case.

推荐答案

您必须像这样手动创建相应的用户和数据库:

You have to create corresponding user and database manually like this:

在外壳中: psql

然后:

  create user alphauser with password 'alphapassword';
  create database alpha_database owner alphauser;
  alter user alphauser superuser createrole createdb replication;
  \q

别忘了分号.

这篇关于PG :: ConnectionBad:严重:用户"alphauser"的密码身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆