An old PostgreSQL client says authentication method 10 not supported
authentication method 10 not supportedShort answer
Method 10 is SASL, which PostgreSQL uses for SCRAM-SHA-256 password login. A client built on a libpq from before PostgreSQL 10 cannot do it and prints this error. Upgrade the client library or driver. If you truly cannot, store that role's password as md5 and use md5 in pg_hba.conf, knowing md5 is deprecated.
Fix it fast
1Find out which cause you have
Ask the server which hash type new passwords get, and check which client version is actually running.
psql --version # on the server, in psql: SHOW password_encryption;2Match what you see, then jump to its fix
- 1
The same user and password work from a new psql on the server, but fail from an old tool, an old PHP or Python build, or a legacy desktop client.The client library is older than SCRAM supportFix - 2
A legacy application you cannot change must keep connecting.The client cannot be upgraded; allow md5 for that role onlyFix
- 1
What does the error look like?
authentication method 10 not supported
Cause 1 of 2
The client library is older than SCRAM support
1Check
The server asks for SASL with the protocol code 10 when the role's password is stored as SCRAM. A client that only knows the older methods reaches its default case and reports the code as unsupported. SCRAM support was added in PostgreSQL 10, so the library must be from that release or later.
psql --version2Fix
Upgrade the client package or the driver that bundles libpq, then reconnect. Rebuild the language extension against the new libpq if it links the library statically.
# Ubuntu 24.04: install the current client
sudo apt update && sudo apt install postgresql-client3Verify
A fresh connection with the same credentials succeeds.
psql "host=localhost dbname=postgres user=my_user" -c 'select 1'Confirmed by raw.githubusercontent.com
Cause 2 of 2
The client cannot be upgraded; allow md5 for that role only
1Check
The server's password_encryption setting decides the hash for a password set with CREATE ROLE or ALTER ROLE. The default is scram-sha-256. Existing md5 hashes are not converted automatically, and an md5 hash still works with an md5 line in pg_hba.conf.
SHOW password_encryption;2Fix
Set password_encryption to md5 in postgresql.conf, reload the server, set the role's password again, and make the matching pg_hba.conf line use md5. The documentation marks md5 as deprecated, so treat this as a stopgap, and set the value back to scram-sha-256 once the client is upgraded.
# postgresql.conf
password_encryption = 'md5'
-- then, in psql:
ALTER ROLE my_user WITH PASSWORD 'new-password-here';
# pg_hba.conf
host all my_user 10.0.0.0/8 md53Verify
Reload the server, then connect with the old client.
psql "host=db.example.com dbname=postgres user=my_user" -c 'select 1'Confirmed by postgresql.org
How do I stop it coming back?
- Keep client drivers and libpq on supported versions before moving a server to PostgreSQL 14 or newer.
- Before changing password_encryption, confirm every client library you use supports SCRAM.
- Plan to move md5 roles to scram-sha-256: set the new password, then change the method in pg_hba.conf.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Related fixes
Databases
JDBC cannot log in to PostgreSQL: authentication type 10
org.postgresql.util.PSQLException: The authentication type 10 is not supported.
Authentication type 10 is SCRAM-SHA-256, the password method PostgreSQL 14 and later use by default.
3 causes, each with a fixBack end
node-postgres: SCRAM-SERVER-FIRST-MESSAGE client password must be a string
SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a non-empty string
The server asked for SCRAM authentication and node-postgres had no string to hash.
4 causes, each with a fixDatabases
DBeaver cannot run pg_restore: the utility is not found in the client home
Utility 'pg_restore' not found in client home '/usr/lib' (/usr/lib)
DBeaver runs pg_restore from a local PostgreSQL client folder; it does not bundle one.
3 causes, each with a fixDatabases
DBeaver cannot download the PostgreSQL driver from Maven
The PostgreSQL driver files are missing and the download does not complete
DBeaver downloads the PostgreSQL JDBC driver from a Maven repository the first time you connect.
3 causes, each with a fixDatabases
python manage.py migrate finishes but the tables for my app are missing
relation "myapp_book" does not exist
migrate only applies migration files that exist.
3 causes, each with a fixDatabases
Django save fails on PostgreSQL: null value in a column violates a not-null constraint
django.db.utils.IntegrityError: null value in column "price" of relation "shop_product" violates not-null constraint
A model field is NOT NULL in the database unless it has null=True.
3 causes, each with a fix