HowTo: Reset MySQL root password
Posted: 12 Apr 2011, 9:58am - Tuesday

This is the way to reset MySQL server password in Centos Linux, steps below:

# /etc/init.d/mysql stop
# /usr/bin/mysqld_safe --skip-grant-tables --skip-networking &
# mysql -u root
mysql> use mysql;
mysql> UPDATE user SET Password = '' WHERE User = 'root';
mysql> exit

# /etc/init.d/mysql stop
# /etc/init.d/mysql start
You may also use service to start and stop the mysql.
#service mysqld start
#service mysqld stop