相关疑难解决方法(0)

获取错误:当试图让pgsql使用rails时,用户"postgres"的对等身份验证失败

我收到错误:

FATAL: Peer authentication failed for user "postgres"
Run Code Online (Sandbox Code Playgroud)

当我尝试使用Rails进行postgres时.

这是我的pg_hba.conf,我的database.yml,以及完整痕迹转储.

我在pg_hba中将身份验证更改为md5并尝试了不同的操作,但似乎都没有.

我还尝试按照Rails 3.2创建一个新的用户和数据库,致命:用户的对等身份验证失败(PG ::错误)

但他们没有出现在pgadmin上,甚至在我跑步时也没有出现sudo -u postgres psql -l.

知道我哪里错了吗?

postgresql ruby-on-rails

679
推荐指数
20
解决办法
57万
查看次数

使用不带密码的psql命令运行批处理文件

我试图psql使用批处理脚本执行此命令:

psql --host=localhost --dbname=<dbname> --port=<Port Number>
     --username=<dbuser> --file=C:\PSQL_Script.txt --output=C:\PSQL_Output.txt
Run Code Online (Sandbox Code Playgroud)

问题是每次执行批处理脚本时都要求输入密码.如何通过批处理文件密码参数?

postgresql connection shell psql

26
推荐指数
1
解决办法
4万
查看次数

标签 统计

postgresql ×2

connection ×1

psql ×1

ruby-on-rails ×1

shell ×1