jump to navigation

mysql root password reset April 7, 2009

Posted by Ajay in Uncategorized.
add a comment

1. Stop the mysqld daemon process.
service mysqld-nt stop

2. Start the mysqld daemon process with the –skip-grant-tables option.
mysqld-nt –skip-grant-tables

3. Start the mysql client with the -u root option.
# mysql -u root

4. Execute the following SQL command to set a new password.
mysql> UPDATE mysql.user SET Password=PASSWORD(‘password’) WHERE User=’root’;

5. Execute the following SQL command to refresh mySQL engine server.