0

I am trying to connect to the Pgbouncer Admin Database but I am little confused where the Admi user is stored. Below my pgbouncer.ini configuration.

[databases]
alias_prod = host=abc.com.br port=5432 dbname=edf user=akl password=kji

[pgbouncer]
listen_addr = *
listen_port = 5432
auth_type = md5
auth_file = /etc/pgbouncer/userlist.txt
server_reset_query =
min_pool_size=20
pool_size=20
admin_users = FOO

Userlist.txt

"AAA" "XXXXX"

So to connect using python, I am using: postgresql+psycopg2://AAA:XXXXX@ip-1.2.3.4.5:5432/alias_prod

The userlist.txt has a list of users that I use to connect to PGBouncer. The alias_prod will have the connection string to the Production Database.

The list_port and list_addr are configuration setting for the PGBouncer.

Now I am trying to connect do PgBouncer Admin database using the command:

psql -p 5432 --dbname=pgbouncer -U AAA

But I getting:

psql: ERROR:  not allowed

I have already tried FOO admin_users configuration.

Any suggestion in how to solve it?

p.magalhaes
  • 7,595
  • 10
  • 53
  • 108

1 Answers1

0

Try this command psql -h *Host address -U AAA -d pgbouncer -p 5432

  • if you have any queries in connecting DB using PgBouncer. Please refer [this](https://medium.com/tensult/pgbouncer-routing-and-rewriting-for-postgresql-using-python-14b12d6595d). – Akash Srinivasan Jul 01 '19 at 11:00