Reset MySQL password
Here’s how to reset the forgotten root password for mysql,
$ sudo su
$ /etc/init.d/mysql stop
$ mysqld --skip-grant-tables
$ mysql -u root mysql
mysql>UPDATE user SET Password=PASSWORD('newpwd') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql>quit
$ /etc/init.d/mysql start
2 Responses to “Reset MySQL password”
Leave a Reply
You must be logged in to post a comment.
October 14th, 2004 at 1:22 pm
Thank you so much. I was getting tired of trying to divine the correct way to get this thing working.
October 29th, 2004 at 11:03 am
Thanks…