Published by exdone
Posted on September 21, 2008
If you’ve forgotten the root password for a MySQL server, but you know the system root, you can reset the MySQL root password pretty easily. Just remember to work quickly since the server is wide open until you finish working.
skip-grant-tables to the
[mysqld] section of /etc/my.cnf and restart the MySQL server.
mysql from the command line and use the following SQL statement:
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
skip-grant-tables from /etc/my.cnf and restart the server
also check out