Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. P

Posts regarding the MySQL database server
Post Reply
chris
Site Admin
Posts: 202
Joined: Mon Jul 21, 2008 9:52 am

Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. P

Post by chris »

I got the message in my logs /var/log/mysql/error.log
Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'

So how to fix this ?
On MySQL 8.0.34 through 8.3, you get this warning.
After MySQL 8.4 which gives errors.

You can see all users and the authentication plugin:
SELECT user, host, plugin from mysql.user;

You can easly update with this command:
ALTER USER '<USERNAME>'@'<HOST>' IDENTIFIED WITH caching_sha2_password BY '<PASSWORD>';

But the application connecting should also support this.
For websites with PHP:
since PHP 7.4 caching_sha2_password authentication is supported.
Post Reply