If you get this error in MySql error logs
[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'
Then You need to migrate your users to use caching_sha2_password instead of mysql_native_password
So let’s go into work in this article I will show you how to migrate your caching_sha2_password
First we will list all effected users using this command
SELECT user,host,plugin,authentication_string,max_questions,password_expired,password_lifetime,account_locked from mysql.user;
![](https://d3i06ps7p1v3hc.cloudfront.net/wp-content/uploads/2024/01/Screenshot-2024-01-10-at-2.09.47 PM-1024x216.png)
Note we have user here is using mysql_native_password
We will need to execute this command to migrate this user to use caching_sha2_password
ALTER USER 'db_user'@'host' IDENTIFIED WITH caching_sha2_password BY 'new_db_password;
Example usage:
ALTER USER 'mohd'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'dUMuT9Sv0a7l; # or check your host is % or localhost for the user ALTER USER 'mohd'@'%' IDENTIFIED WITH caching_sha2_password BY 'dUMuT9Sv0a7l;
Thanks for reading. Share your article with your developers friends.