我正在尝试配置最新的 pgbouncer 以与 postgres 9 一起使用。我可以使用psql正确的密码连接到我的数据库,但是当我使用时,psql -p 6432我无法连接,错误消息为psql: ERROR: auth failed
这似乎可能是由我的 userlist.txt 文件引起的,但我不确定。我检查过,所有必需的文件均由 Postgres 系统用户完全拥有
pgbouncer.ini
[databases]
postgres = host=localhost port=5433 auth_user=postgres dbname=postgres
[pgbouncer]
pidfile = /usr/local/pgbouncer-1.9.0/pgbouncer.pid
logfile = /usr/local/pgbouncer-1.9.0/log/pgbouncer.log
user = postgres
listen_addr = *
listen_port = 6432
auth_type = md5
auth_file = /usr/local/pgbouncer-1.9.0/etc/userlist.txt
Run Code Online (Sandbox Code Playgroud)
用户列表.txt
"postgres" "md5<MD5 SUM>"
用于启动 pgbouncer 的命令
./bin/pgbouncer -d etc/pgbouncer.ini
日志输出显示失败
2019-08-20 13:46:01.080 16446 LOG C-0x1028ce0: postgres/postgres@127.0.0.1:43286 login attempt: db=postgres user=postgres tls=no
2019-08-20 13:46:01.080 16446 LOG C-0x1028ce0: postgres/postgres@127.0.0.1:43286 closing …Run Code Online (Sandbox Code Playgroud)