Created
February 16, 2019 07:52
-
-
Save sathishmanohar/179750f086c2728266ba9c6a68f527a0 to your computer and use it in GitHub Desktop.
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
Logging in with command line | |
============================ | |
When password is not set with the below method. always use `sudo mysql -u root -p` for the login prompt. | |
Unless password is not set, login won't work without sudo | |
Reset password instructions here | |
================================ | |
https://stackoverflow.com/questions/16556497/how-to-reset-or-change-the-mysql-root-password/51023379#51023379 | |
MYSQL-SERVER >= 5.7 | |
sudo mysql -uroot -p | |
USE mysql; | |
UPDATE user SET authentication_string=PASSWORD('YOUR_PASSWORD') WHERE User='root'; | |
UPDATE user SET plugin="mysql_native_password"; | |
FLUSH PRIVILEGES; | |
quit; | |
MYSQL-SERVER < 5.7 | |
sudo mysql -uroot -p | |
USE mysql; | |
UPDATE user SET password=PASSWORD('YOUR_PASSWORD') WHERE User='root'; | |
UPDATE user SET plugin="mysql_native_password"; | |
FLUSH PRIVILEGES; | |
quit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment