- Stop the MySQL server process:
$ /etc/init.d/mysql stop
- Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for password:
$
mysqld_safe --skip-grant-tables &
- Connect to mysql server as the root user:
$
mysql -u root
- Setup new mysql root account password and quit:
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
mysql> quit - Restart the MySQL server:
$ /etc/init.d/mysql stop
Thursday, April 22, 2010
Recover MySQL root Password
You can recover MySQL database server's root password with the following five steps.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment