Dear René,
I am writing to you to request technical guidance regarding an intermittent authentication issue we are encountering in our production environment. We are utilizing ProxySQL as a database proxy for a MySQL Group Replication cluster, specifically within a credential-fetching flow (our user authentication mechanism).
ProxySQL Version: 3.0.3-291-gcce161b
MySQL Backend Version: 8.4.6-6 (Group Replication)
Architecture: Kubernetes-based deployment.
Authentication Config: The backend MySQL 8.4.6 instances are using caching_sha2_password. ProxySQL is configured with mysql-default_authentication_plugin='mysql_native_password'.
We are observing intermittent failures during the client-to-proxy handshake. The flow involves an application service fetching credentials and immediately attempting to establish a connection. While some connections succeed, some fail with an "Access Denied" error during the authentication switch.
From the ProxySQL error logs, we see the following sequence during a failure event:
1. Handshake Disconnection:
2026-04-27 15:16:17 MySQL_Protocol.cpp:1556:PPHR_1(): [ERROR] User 'db_user_app'@'10.x.x.x' is disconnecting during switch auth
2. Access Denied (WrongCredentials):
2026-04-27 15:16:17 MySQL_Session.cpp:5501:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE_WrongCredentials(): [ERROR] ProxySQL Error: Access denied for user 'db_user_app'@'10.x.x.x' (using password: YES)
Version Specifics: This is appearing with the newer MySQL 8.4.6-6 LTS branch. We suspect the interaction between ProxySQL 3.0.x and the updated authentication defaults in MySQL 8.4 may be a contributing factor.
Auth Switch Logic: The log PPHR_1() suggests the disconnection occurs exactly when the protocol attempts to switch authentication methods.
Credential Sync: We have confirmed that the user credentials in mysql_users match the backend exactly. The issue is intermittent, which suggests the credentials themselves are technically correct, but the handshake state machine is failing under certain conditions (latency, concurrency, or driver-specific behavior).
Client Driver: The application is using [mysql-connector-j-8.2.0].
With ProxySQL 3.0.3, are there known issues or race conditions when handling the AuthSwitchRequest for MySQL 8.4 backends, specifically regarding the caching_sha2_password vs mysql_native_password fallback?
(I can see one issue https://github.com/sysown/proxysql/issues/4596, but it was in proxysql 2.6, can this still happen in 3.X?)
Does the PPHR_1() error code pinpoint whether the ProxySQL worker thread is terminating the session due to a timeout, or if the client driver is sending an unexpected response to the AuthSwitch packet?
Are there recommended mysql-threshold or mysql-connection variables in 3.0.x that should be tuned specifically for high-frequency credential-fetching flows to prevent these handshake drops?
For both(mysql & proxysql) the used versions I see caching_sha2_password, is by default supported, still any explicit configuration needed at either side?
Proxysql:
+-------------------------------------+-----------------------+
| Variable_name | Value |
+-------------------------------------+-----------------------+
| mysql-default_authentication_plugin | caching_sha2_password |
+-------------------------------------+-----------------------+
We appreciate your time and the incredible work you've done with ProxySQL. Any direction you can provide to stabilize this auth-switch behavior would be invaluable.
Best regards,
Pravata