To provide multi user  access to number of databases a relation database management system is been developed that runs on a server and called as MySQL. MySQL is developed under GNU General Public License and its source code is available under its defined terms. MySQL is a popular choice of database for use in web applications and it performs really well with cPanel hosting accounts to store data of any websites. And suppose if you have forget the MySQL root password and you are not able to access your mysql service then you need to reset the password of MySQL root user by using following steps which are as follows,

Steps to Reset MySQL root Password :

1)[email protected] [~]/etc/init.d/mysqld stop

2)Start to MySQL server without password:
[email protected] [~]mysqld_safe –skip-grant-tables &

3) [email protected] [~] mysql
After that you can get the mysql prompt then run the following command

4)mysql >use mysql;

5)mysql >update user set password=PASSWORD(“NEWPASSWORD”) where User=’root’;

6)mysql > quit

7)[email protected] [~]/etc/init.d/mysqld [email protected] [~]/etc/init.d/mysqld start
Now you can access your mysql service by using
[[email protected] ~]#mysql -u root -p