<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Milind Satpute</title>
    <description>The latest articles on DEV Community by Milind Satpute (@milindsatpute).</description>
    <link>https://dev.to/milindsatpute</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F89601%2F861b219d-5231-4cdc-8286-4e7c330b402f.jpeg</url>
      <title>DEV Community: Milind Satpute</title>
      <link>https://dev.to/milindsatpute</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/milindsatpute"/>
    <language>en</language>
    <item>
      <title>🚀 Fixing PgBouncer “FATAL: server login failed: wrong password type” When Using PostgreSQL 15–18+</title>
      <dc:creator>Milind Satpute</dc:creator>
      <pubDate>Tue, 09 Dec 2025 19:13:26 +0000</pubDate>
      <link>https://dev.to/milindsatpute/fixing-pgbouncer-fatal-server-login-failed-wrong-password-type-when-using-postgresql-15-18-495g</link>
      <guid>https://dev.to/milindsatpute/fixing-pgbouncer-fatal-server-login-failed-wrong-password-type-when-using-postgresql-15-18-495g</guid>
      <description>&lt;p&gt;If you're using &lt;strong&gt;PgBouncer&lt;/strong&gt; as a connection pooler in front of &lt;strong&gt;PostgreSQL 15+ (including 18+)&lt;/strong&gt;, you may hit this frustrating error in your logs or in your client apps (DBeaver, psql, applications):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FATAL: server login failed: wrong password type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This issue usually appears &lt;strong&gt;after upgrading PostgreSQL&lt;/strong&gt; or when deploying PgBouncer in Docker with the default configuration.&lt;/p&gt;

&lt;p&gt;The good news?&lt;br&gt;
It’s not actually a bug — it’s a &lt;strong&gt;password hash mismatch&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Let’s walk through the root cause and the cleanest fix.&lt;/p&gt;


&lt;h2&gt;
  
  
  ❗ Why this error happens
&lt;/h2&gt;

&lt;p&gt;PostgreSQL 14 and later &lt;strong&gt;default to SCRAM-SHA-256 passwords&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SHOW&lt;/span&gt; &lt;span class="n"&gt;password_encryption&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; 
&lt;span class="c1"&gt;-- scram-sha-256&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Meanwhile, PgBouncer traditionally expected &lt;strong&gt;MD5 hashes&lt;/strong&gt; in its &lt;code&gt;userlist.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;When PgBouncer reads an MD5 hash but the actual PostgreSQL user is stored as SCRAM, authentication fails with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wrong password type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This happens because PgBouncer tries to forward the MD5-based password to PostgreSQL, but PostgreSQL rejects it — the hash formats don’t match.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔍 Signs you are affected
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;PgBouncer logs show:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  FATAL: server login failed: wrong password type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;DBeaver or your app says:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  password authentication failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;You are running:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PostgreSQL 14, 15, 16, 17, or 18+&lt;/li&gt;
&lt;li&gt;Any Dockerized PgBouncer setup (edoburu, bitnami, cloudnative-pg, icoretech, etc.)&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;




&lt;h2&gt;
  
  
  ✅ The Correct Fix: Use SCRAM hashes inside PgBouncer’s &lt;code&gt;userlist.txt&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;PgBouncer can authenticate using SCRAM — you just have to &lt;strong&gt;give it the actual SCRAM hashes from PostgreSQL&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1 — Get the SCRAM hash from PostgreSQL
&lt;/h3&gt;

&lt;p&gt;Run as a superuser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;rolpassword&lt;/span&gt; 
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_authid&lt;/span&gt; 
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;rolname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'myappuser'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This returns something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SCRAM-SHA-256$4096:kafj2....==$storedkey:$serverkey
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Copy the ENTIRE line.&lt;/p&gt;




&lt;h3&gt;
  
  
  Step 2 — Update PgBouncer’s &lt;code&gt;userlist.txt&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Open your local file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pgbouncer/userlist.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace or add:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"myappuser" "SCRAM-SHA-256$4096:xxxxxxxxxx==$storedkey:$serverkey"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ Notes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quotes are mandatory.&lt;/li&gt;
&lt;li&gt;No extra whitespace.&lt;/li&gt;
&lt;li&gt;One user per line.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Step 3 — Restart PgBouncer
&lt;/h3&gt;

&lt;p&gt;PgBouncer &lt;strong&gt;must reload&lt;/strong&gt; after editing &lt;code&gt;userlist.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For Docker Compose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker compose restart pgbouncer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or with the admin console:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;psql &lt;span class="nt"&gt;-h&lt;/span&gt; localhost &lt;span class="nt"&gt;-p&lt;/span&gt; 6432 pgbouncer &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"RELOAD"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🧪 Step 4 — Test the connection
&lt;/h2&gt;

&lt;p&gt;If it works, PgBouncer logs &lt;em&gt;won’t&lt;/em&gt; show the error anymore and DBeaver / your app will connect normally.&lt;/p&gt;




&lt;h2&gt;
  
  
  🛑 Alternative (NOT recommended): Downgrade PostgreSQL to MD5
&lt;/h2&gt;

&lt;p&gt;You may see this workaround online:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set &lt;code&gt;password_encryption = md5&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Reset user passwords&lt;/li&gt;
&lt;li&gt;Put MD5 hashes in &lt;code&gt;userlist.txt&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That works but reduces security and breaks alignment with modern PostgreSQL defaults.&lt;br&gt;
Use SCRAM unless you have a legacy requirement.&lt;/p&gt;




&lt;h2&gt;
  
  
  🧩 Final Working Example
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;code&gt;userlist.txt&lt;/code&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"postgres" "SCRAM-SHA-256$4096:abcd123...$storedkey:$serverkey"
"myappuser" "SCRAM-SHA-256$4096:efgh456...$storedkey:$serverkey"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;code&gt;pgbouncer.ini&lt;/code&gt; snippet
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;auth_type = scram-sha-256
auth_file = /etc/pgbouncer/userlist.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🎉 Conclusion
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;wrong password type&lt;/code&gt; error is simply a mismatch between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;PostgreSQL’s real password hash (SCRAM)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;PgBouncer’s expected password entry (MD5 or SCRAM)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fixing the issue is just a matter of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Reading the real SCRAM hash from Postgres&lt;/li&gt;
&lt;li&gt;Using it in PgBouncer’s &lt;code&gt;userlist.txt&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Restarting PgBouncer&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Once aligned, PgBouncer works perfectly with PostgreSQL 14–18+.&lt;/p&gt;




&lt;p&gt;If you want, I can also write:&lt;/p&gt;

&lt;p&gt;✅ a downloadable example project (docker-compose + configs)&lt;br&gt;
✅ an image diagram explaining the flow&lt;br&gt;
✅ a troubleshooting checklist section&lt;/p&gt;

&lt;p&gt;Just tell me!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>pgbouncer</category>
      <category>edoburu</category>
    </item>
    <item>
      <title>🔒 Stop Downgrading Postgres: The Secure SCRAM Fix for PgBouncer Authentication</title>
      <dc:creator>Milind Satpute</dc:creator>
      <pubDate>Tue, 09 Dec 2025 19:10:50 +0000</pubDate>
      <link>https://dev.to/milindsatpute/stop-downgrading-postgres-the-secure-scram-fix-for-pgbouncer-authentication-38na</link>
      <guid>https://dev.to/milindsatpute/stop-downgrading-postgres-the-secure-scram-fix-for-pgbouncer-authentication-38na</guid>
      <description>&lt;p&gt;&lt;strong&gt;A secure, production-ready fix for the FATAL: server login failed: wrong password type error when connecting PgBouncer to a modern PostgreSQL database (v14+) using SCRAM-SHA-256 authentication.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you are setting up a modern application stack with &lt;strong&gt;Docker Compose&lt;/strong&gt;, &lt;strong&gt;PostgreSQL (v14+)&lt;/strong&gt;, and &lt;strong&gt;PgBouncer&lt;/strong&gt; for connection pooling, you've likely hit this frustrating error in your logs or database client (like DBeaver):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FATAL: server login failed: wrong password type
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This occurs because modern PostgreSQL defaults to the secure &lt;strong&gt;SCRAM-SHA-256&lt;/strong&gt; authentication method, but PgBouncer's default configuration often can't handle it seamlessly.&lt;/p&gt;

&lt;h2&gt;
  
  
  👎 The Common (and Flawed) Workaround: Downgrading to MD5
&lt;/h2&gt;

&lt;p&gt;Many online guides suggest the quick fix: force your PostgreSQL container to use the deprecated &lt;strong&gt;MD5&lt;/strong&gt; method by adding environment variables like &lt;code&gt;POSTGRES_HOST_AUTH_METHOD=md5&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# ⚠️ WARNING: DO NOT USE THIS FOR PRODUCTION!&lt;/span&gt;
&lt;span class="na"&gt;postgres&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# ...&lt;/span&gt;
  &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# ...&lt;/span&gt;
    &lt;span class="na"&gt;POSTGRES_HOST_AUTH_METHOD&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;md5&lt;/span&gt; 
    &lt;span class="na"&gt;POSTGRES_INITDB_ARGS&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;--auth=md5&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;This works, but it forces your production-ready PostgreSQL server to use a weaker, outdated encryption standard.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🛡️ The Secure Solution: SCRAM Hash Transfer
&lt;/h2&gt;

&lt;p&gt;The correct, production-grade fix is to let PostgreSQL keep its secure &lt;strong&gt;SCRAM-SHA-256&lt;/strong&gt; authentication and manually configure &lt;strong&gt;PgBouncer&lt;/strong&gt; to use the exact SCRAM hash generated by PostgreSQL.&lt;/p&gt;

&lt;p&gt;This approach keeps your database secure and resolves the "wrong password type" error.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prerequisites: PgBouncer Setup
&lt;/h3&gt;

&lt;p&gt;We will assume you are using the popular &lt;strong&gt;&lt;code&gt;edoburu/pgbouncer&lt;/code&gt;&lt;/strong&gt; image and have mapped a local &lt;code&gt;userlist.txt&lt;/code&gt; file into the container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Create the &lt;code&gt;userlist.txt&lt;/code&gt; file&lt;/strong&gt;&lt;br&gt;
Create a local directory (e.g., &lt;code&gt;./pgbouncer&lt;/code&gt;) and an empty &lt;code&gt;userlist.txt&lt;/code&gt; file inside it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Update &lt;code&gt;docker-compose.dev.yml&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
Ensure the volume mount is present on your &lt;code&gt;pgbouncer&lt;/code&gt; service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# docker-compose.dev.yml snippet&lt;/span&gt;
&lt;span class="na"&gt;pgbouncer&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${PGBOUNCER_IMAGE}&lt;/span&gt; &lt;span class="c1"&gt;# e.g., edoburu/pgbouncer:latest&lt;/span&gt;
  &lt;span class="c1"&gt;# ... other config&lt;/span&gt;
  &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# Map the local file to the container path&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./pgbouncer/userlist.txt:/etc/pgbouncer/userlist.txt&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 1: Get the SCRAM Hash from PostgreSQL
&lt;/h3&gt;

&lt;p&gt;The first step is to retrieve the SCRAM-hashed password string for your database user from the PostgreSQL system tables.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Start your stack&lt;/strong&gt; (the PgBouncer container will fail to connect for now, but that's fine):&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.dev.yml &lt;span class="nt"&gt;--env-file&lt;/span&gt; .env.dev up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Connect to the PostgreSQL Container&lt;/strong&gt; using &lt;code&gt;docker exec&lt;/code&gt; and the &lt;code&gt;psql&lt;/code&gt; client. (Adjust container name and user as needed from your &lt;code&gt;.env.dev&lt;/code&gt; file, e.g., &lt;code&gt;tnt_postgres_dev&lt;/code&gt; and &lt;code&gt;tnt_admin&lt;/code&gt;).&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec&lt;/span&gt; &lt;span class="nt"&gt;-it&lt;/span&gt; tnt_postgres_dev psql &lt;span class="nt"&gt;-U&lt;/span&gt; tnt_admin &lt;span class="nt"&gt;-d&lt;/span&gt; tnt_dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Execute the Query to Extract the Hash:&lt;/strong&gt;&lt;br&gt;
This query pulls the encrypted password from the &lt;code&gt;pg_shadow&lt;/code&gt; table and prefixes it correctly for PgBouncer.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="s1"&gt;'SCRAM-SHA-256$'&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;passwd&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;pg_shadow&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;usename&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'tnt_admin'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;Example Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                  ?column?
----------------------------------------------------------------------------------------------------------------------------------
SCRAM-SHA-256$2048:y+y1d/g.../z2+9eJ/1+Q==$:GzB3... # &amp;lt;--- COPY THIS ENTIRE STRING
(1 row)
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;strong&gt;Copy the entire string&lt;/strong&gt; starting from &lt;code&gt;SCRAM-SHA-256$&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Step 2: Manually Update &lt;code&gt;userlist.txt&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Edit your local &lt;code&gt;pgbouncer/userlist.txt&lt;/code&gt; file and paste the copied hash. The format required by PgBouncer is:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"username" "hash_string"&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;./pgbouncer/userlist.txt&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"tnt_admin" "SCRAM-SHA-256$2048:y+y1d/g.../z2+9eJ/1+Q==$:GzB3..." 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Step 3: Final Restart and Connection
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Stop and Recreate Containers:&lt;/strong&gt;&lt;br&gt;
You must stop the PgBouncer container and re-run &lt;code&gt;up -d&lt;/code&gt; to load the newly updated &lt;code&gt;userlist.txt&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker-compose &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.dev.yml &lt;span class="nt"&gt;--env-file&lt;/span&gt; .env.dev down
docker-compose &lt;span class="nt"&gt;-f&lt;/span&gt; docker-compose.dev.yml &lt;span class="nt"&gt;--env-file&lt;/span&gt; .env.dev up &lt;span class="nt"&gt;-d&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your PgBouncer service will now start and successfully use the secure SCRAM hash to authenticate with PostgreSQL. You can connect your application or database client (like DBeaver) to the &lt;strong&gt;PgBouncer port (e.g., 6432)&lt;/strong&gt; using your original plaintext password.&lt;/p&gt;

&lt;p&gt;This method successfully resolves the authentication issue while keeping your PostgreSQL security settings at the modern standard. Happy pooling!&lt;/p&gt;

</description>
      <category>docker</category>
      <category>pgbouncer</category>
      <category>edoburu</category>
    </item>
  </channel>
</rss>
