Created
November 13, 2013 00:00
-
-
Save korayguclu/7441022 to your computer and use it in GitHub Desktop.
reseting mysql 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 /etc/init.d/mysql stop | |
sudo /usr/sbin/mysqld --skip-grant-tables --skip-networking & | |
mysql -u root | |
FLUSH PRIVILEGES; | |
SET PASSWORD FOR root@'localhost' = PASSWORD('password'); | |
#If you have a mysql root account that can connect from everywhere, you should also do: | |
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root'; | |
sudo /etc/init.d/mysql start | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment