Bug #112581 "Plugin mysql_native_password reported"- user already uses caching_sha2_password
Submitted: 30 Sep 2023 20:49 Modified: 2 Oct 2023 12:31
Reporter: Nuno P Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:8.0 OS:Other (Docker)
Assigned to: CPU Architecture:x86

[30 Sep 2023 20:49] Nuno P
Description:
I was now investigating a case where the code (PHP with mysqli) couldn't connect to the database on the same server.

> Access denied for user 'xxxx'@'172.28.0.1' (using password: YES)

Username, Password, Host and Port were 100% correct.

I could see this log being written to the server logs:

> Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

However, when I checked `mysql.user`, the `plugin` for this user is "caching_sha2_password".

The problem was that the user requires SSL, so it was resolved by simply connecting to the database using SSL.

What I'd like to report here is that the error logged is misleading, as the user does not use "mysql_native_password", and it might help as well if the "Access denied" error message could say that the user requires SSL.

Thank you very much!

How to repeat:
N/A

Suggested fix:
The error logged is misleading, as the user does not use "mysql_native_password", and it might help as well if the "Access denied" error message could say that the user requires SSL.
[2 Oct 2023 12:31] MySQL Verification Team
Hi Mr. P,

Thank you for your bug report.

However, what you describe can not be repeated.

You should make a test case using SQL statements, like CREATE USER ....... etc ...... and use our mysql CLI in order to show us the problematic behaviour. Please, do not send us your PHP code.

If you supply us with the described test case, we shall be happy to proceed.

Can't repeat.