MySQL 8.0.35 and mysql_native_password

I am currently using MySQL 8.0.33 and am planning to upgrade to version 8.0.35.

In my configuration file (my.cnf) I have set:

Code:
default_authentication_plugin=mysql_native_password

According to the MySQL 8.0.35 release notes found at https://dev.mysql.com/doc/relnotes/mysql/8.0/en/news-8-0-35.html, it is mentioned that "mysql_native_password now replaces caching_sha2_password as the default authentication method when the server does not support pluggable authentication."

I typically add users using the following command:

Code:
CREATE USER 'username'@'%' IDENTIFIED WITH mysql_native_password BY 'password';

Given this information, I am concerned about whether there will be any issues logging in with these accounts after upgrading to MySQL 8.0.35.
 
You should test it first. Create a user with caching_sha2_password
CREATE USER 'sha2user'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'password';
It will be the same as:
CREATE USER 'sha2user'@'localhost'' IDENTIFIED BY 'password';
After your upgrade the MySQL

Then try to auth with it from the app that you are using like PHP

And if you can't log in you can change the password back to mysql_native_password

ALTER USER 'sha2user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

As of MySQL 8.0.34, the mysql_native_password authentication plugin is deprecated and subject to removal in a future version of MySQL.
So you will need to look for a way to change your client application to support the new sha2_password hash.
 
Last edited:
I've just updated from 5.7 to 8.0.35 and you can get a lot of messages like this:

[Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

Code:
ALTER USER 'the_user'@'the_host' IDENTIFIED WITH caching_sha2_password BY 'super_duper_secret';

Seems to make it happier. This is using PHP 8.2.14 (mysqlnd) and it (PHP) can still connect. But something you'd want to check for yourself!
 
Back
Top