Posted on April 2nd, 2009 No comments
Yesterday my friend had ask me how he can reset the mysql password, because he had forget his password.
Here are the following steps that we made.
On *nix systems, type the following commands on console
1.Â on console: service mysqld stop
2.Â on console: start the mysql daemon process with –skip-grant-tables
3. on console: mysql -u root
4.Â on mysql: UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE user=’root’;
5.Â on mysql: FLUSH PRIVILEGES;
6.Â on console: service mysqld restart
Now write the new password on a piece of paper :O