1997
MySQLERRORCommonAuthenticationHIGH confidence

Client does not support authentication protocol

Production Risk

High — all connections from affected clients will be refused.

What this means

The client attempted to connect using an authentication method not supported by the server, or the password was hashed using an old format that the server no longer accepts. Common when MySQL 8.0 changed the default auth plugin to caching_sha2_password.

Why it happens
  1. 1Server uses caching_sha2_password but client only supports mysql_native_password.
  2. 2Old client library connecting to MySQL 8.0+.
  3. 3Password stored using old_passwords format.
How to reproduce
trigger — this will error
trigger — this will error
mysql -u app_user -p -- using an old client

expected output

ERROR 1997 (HY000): Client does not support authentication protocol requested by server; consider upgrading MySQL client.

Fix 1

Change the user to use mysql_native_password

Change the user to use mysql_native_password
ALTER USER 'app_user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

Why this works

Reverts the user to the legacy auth plugin that older clients support.

Fix 2

Upgrade the client library to one that supports caching_sha2_password

Upgrade the client library to one that supports caching_sha2_password
-- Install MySQL Connector 8.0+ or use libmysqlclient 8.0+

Why this works

Modern client libraries support all MySQL 8.0 authentication plugins.

What not to do

Version notes

Sources
Official documentation ↗

MySQL 8.0 — 1997 ER_NOT_SUPPORTED_AUTH_MODE

Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev

← All MySQL errors