Created
May 10, 2021 04:06
-
-
Save decodedmrq/7a18702f50ae255c59cb21b3cfee5a4f to your computer and use it in GitHub Desktop.
Change password in mysql with plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*auth_socket* If you install 5.7 and don’t provide a password to the root user, it will use the auth_socket plugin. That plugin doesn’t care and doesn’t need a password. It just checks if the user is connecting using a UNIX socket and then compares the username. | |
*mysql_native_password* | |
If we want to configure a password, we need to change the plugin and set the password at the same time, in the same command. First changing the plugin and then setting the password won’t work, and it will fall back to auth_socket again | |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test'; | |
Normal change password for root mysql.user: ALTER USER 'root'@'localhost' IDENTIFIED BY '2DEyjZKiN6'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment