New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ask about auth_query, auth_user #967
Comments
You need to add |
@JelteF |
I'm also encountering a problem like that |
Yes |
Oh I now see you have set |
@JelteF vinh@vinh:~/Desktop/Work/Work-1810-2210/pg_bouncer$ PGPASSWORD=user1pass psql -h 127.0.0.1 -p 16432 -U user1 db1
psql: error: connection to server at "127.0.0.1", port 16432 failed: FATAL: password authentication failed
.1, tls: OpenSSL 3.0.8 7 Feb 2023
2023-10-24 15:17:09.320 +07 [9646] LOG C-0x557bb2213ed0: db1/user1@127.0.0.1:50926 login attempt: db=db1 user=user1 tls=no
2023-10-24 15:17:09.321 +07 [9646] LOG C-0x557bb2213ed0: db1/user1@127.0.0.1:50926 closing because: password authentication failed (age=0s)
2023-10-24 15:17:09.321 +07 [9646] WARNING C-0x557bb2213ed0: db1/user1@127.0.0.1:50926 pooler error: password authentication failed |
@JelteF |
@vinhnd20 see #975 (comment) . |
@vinhnd20 It looks like Now this user should be able to authenticate itself in order to run The improvement is that you only have to have one line in auth_file, instead of listing all the Postgres users. In summary you still need an auth_file with the auth_user and its password in it. psql -c "CREATE USER pgbouncer_auth_user WITH ENCRYPTED PASSWORD 'yourpass';" pgbouncer.ini userlist.txt Now connect using the database user you want. |
not so helpful. I also stuck with problem. After I read guide , In my understanding no need any
user |
@vinhnd20 did you find solution for yourself ? |
@garry-t see my previous comment. You need the |
Ok, yep.
inside Ticket can be closed in my opinion. |
I'm learning how to use
auth_query
,auth_user
without usinguserlist.txt
.Below are my steps:
user1
:postgres=# create user user1 password 'user1pass'; CREATE ROLE
postgres=# create database db1 owner user1; CREATE DATABASE
pgbouncer.ini
:[databases] db1 = host=localhost dbname=db1 auth_user=user1 [pgbouncer] listen_addr = 127.0.0.1 listen_port = 16432 auth_type = md5 auth_query = SELECT usename, passwd FROM user_search($1)
PGPASSWORD=user1pass psql -h 127.0.0.1 -p 16432 -U user1 db1 psql: error: connection to server at "127.0.0.1", port 16432 failed: FATAL: password authentication failed
Is there a way to avoid using
userlist.txt
?The text was updated successfully, but these errors were encountered: