我收到错误:
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
.
知道我哪里错了吗?
我试图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)
问题是每次执行批处理脚本时都要求输入密码.如何通过批处理文件密码参数?