Created
December 11, 2017 22:29
-
-
Save lgalaz/7791e790f85fb9c583b59f62e15f4daa to your computer and use it in GitHub Desktop.
Change Mysql root password
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
$ sudo service mysql start | |
$ cd /var/run | |
--// Back the sock | |
$ sudo cp -rp ./mysqld ./mysqld.bak | |
$ sudo service mysql stop | |
$ sudo mv ./mysqld.bak ./mysqld | |
$ sudo mysqld_safe --skip-grant-tables --skip-networking & | |
mysql -u root | |
use mysql; | |
update user set authentication_string=PASSWORD("") where User='root'; | |
update user set plugin="mysql_native_password" where User='root'; # THIS LINE | |
flush privileges; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment