Hi Percona,
How to change the plugin of users from mysql_native to caching_sha2 for which we dont know the password. Any way to make it happen ?
we want to keep the same password and just change the plugin and we dont know the passwords as we dont store it anywhere.
Hi Hussain,
Unfortunately, it is not possible to change the plugin without knowing the password. This is because the passwords created with mysql_native_password
cannot be decrypted. If you do know the passwords, you can alter the user to change the authentication plugin by sending the same password in plain text on the command line.
ALTER USER 'user'@'host' IDENTIFIED WITH caching_sha2_password BY 'same_password';
Doc link for references: https://dev.mysql.com/doc/refman/8.4/en/alter-user.html
Best