1: Stop the MySQL server process.
2: Start the MySQL server/daemon process with the –skip-grant-tables option
3: Connect to mysql server as the root user.
4: Setup new mysql root account password.
5: Exit and restart the MySQL server.
CLI on Linux:
/etc/init.d/mysql stop
mysqld_safe –skip-grant-tables &
mysql -u root
use mysql;
update user set password=PASSWORD(“NEW-ROOT-PASSWORD”) where User=’root’;
flush privileges;
quit
/etc/init.d/mysql stop
/etc/init.d/mysql start
mysql -u root -p