Created
October 31, 2018 21:22
-
-
Save srmklive/c9105f88d130f7eb5d9b713ed87d2023 to your computer and use it in GitHub Desktop.
(How i fixed) SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
This file contains 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
1. First edit the mysql config e.g. /etc/mysql/my.cnf & added the following: | |
[mysqld] | |
default_authentication_plugin= mysql_native_password | |
2. Then run the following command: | |
mysql_upgrade -u root -p --default-auth=mysql_native_password | |
3. If above command succeeds, then login into mysql server: | |
mysql -u root -p | |
4. Lastly the update password for the user you want to change: | |
ALTER USER 'myuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment