Last active
June 18, 2020 17:50
-
-
Save stephanie56/e24c3fed6770c517625ac6e68402733b to your computer and use it in GitHub Desktop.
Fix mysql access denied for user 'admin'@'localhost' (using password: yes)
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
- Stop Mysql server | |
- Run `sudo mysqld_safe --skip-grant-tables` | |
- Enter password | |
- Keep the previous terminal open, start a new terminal window | |
- Run `mysql -u root` to log in to mysql | |
- Run `flush privileges;` | |
- Run `ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'new_password';` | |
- Run `flush privileges;` | |
- Run `\q` to quit | |
- Turn off both terminals, open a new terminal to login to mysql with new password `mysql -uroot -p` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment