MySQL Forums
Forum List  »  Security

How to change the login plugin from mysql_native_password to caching_sha2_password
Posted by: Liang Cheng
Date: April 10, 2024 03:30AM

Hi,
Most of our environments are mysql5.7 and we are trying MySQL8 recently. One difference between 5.7.x and 8.0 is that the default login plugin is changed from mysql_native_password to caching_sha2_password.
For now, we know that we can upgrade the existing 5.7 environments to 8.0 by specifying the plugin to mysql_native_password. But mysql_native_password will be deprecated anyway. So we wonder that how to change login plugin of existing users from mysql_native_password to caching_sha2_password in case that we want to plan upgrade 5.7 to latest 8.0+. We know how to change the login plugin for any user manually created by us.
But we don't know how to migrate for system users, e.g. mysql.sys, mysql.session and the internal users created by mysqlrouter, I suspect the login plugin of mysqlrouter user maybe related to plugin type of system user.

| mysql_router1_9dpfyggnr7bg | % | mysql_native_password |
| mysql_router1_r2dvd2ouvpsh | % | mysql_native_password |
| mysql_router8_nnuisdqf5bgi | % | mysql_native_password |
| mysql_router8_q67c850fzp1p | % | mysql_native_password |
| replication_user | % | caching_sha2_password |
| root | % | caching_sha2_password |
| mysql.infoschema | localhost | caching_sha2_password |
| mysql.session | localhost | mysql_native_password |
| mysql.sys | localhost | mysql_native_password |

Please share some knowledge, thanks a lot.

Options: ReplyQuote


Subject
Views
Written By
Posted
How to change the login plugin from mysql_native_password to caching_sha2_password
433
April 10, 2024 03:30AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.