can't connect to pgbouncer administration database
-
02-10-2020 - |
Question
I installed pgbouncer and I setup the pgbouncer.ini and my application can connect to pgbouncer and make queries.
But when I try to connect to the virtual administration database of pgbouncer by using the following command
psql -p 6543 -U postgres pgbouncer
I get the following message
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.6543"?
Solution
Try with host in your connection string. For example, if you used listen_addr = 127.0.0.1
in your config
file, then use:
psql -h 127.0.0.1 -p 6543 -U postgres pgbouncer
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange