Last active
November 4, 2018 03:54
-
-
Save kurnias/46062a09b0b62644d9203a2da09b14ae 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
Start server | |
$ sudo service mysql start | |
Go to sock folder | |
$ cd /var/run | |
Back up the sock | |
$ sudo cp -rp ./mysqld ./mysqld.bak | |
Stop server | |
$ sudo service mysql stop | |
Restore the sock | |
$ sudo mv ./mysqld.bak ./mysqld | |
Start mysqld_safe | |
$ sudo mysqld_safe --skip-grant-tables --skip-networking & | |
Init mysql shell | |
mysql -u root | |
Change password | |
FLUSH PRIVILEGES; | |
SET PASSWORD FOR root@'localhost' = PASSWORD('my_new_password'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment