Reputation: 2382
would you be so kind to advise how to connect to pgbouncer
's internal database ?
I try to follow the community instructions here: https://www.depesz.com/2012/12/02/what-is-the-point-of-bouncing/ and more specifically:
$ sudo -i -u postgres
[sudo] password for xxx:
-bash-4.2$ psql --dbname=pgbouncer --host=x.x.x.x --port=15434
psql: ERROR: no such user: postgres
But I don't know what I am doing wrong. The postgres
user should be internal one.
EDIT: as a postgres
user if I list all databases present, I get
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
metabase | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
postgres | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
registry | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 |
template0 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres +
| | | | | postgres=CTc/postgres
template1 | postgres | UTF8 | en_GB.UTF-8 | en_GB.UTF-8 | postgres=CTc/postgres+
| | | | | =c/postgres
(5 rows)
Upvotes: 0
Views: 5260
Reputation: 119
STEP 1: Check the current running process by using this command sudo lsof -i :5439
"5439" is nothing but DB port.
STEP 2: kill all the running process by this command sudo kill -9 2911
2911- running process. make sure that you killed all running process. To confirm that again use the above command and press enter.
STEP 3: finally connect by using this command psql -h X.X.X.X -u pguser -d pgbouncer -p 5439
"h"-host private ip, "u"-username, "d"-database name, "p"-db port.
Upvotes: 1