when a MySQL server is running but root access has lost somehow and require to reset root access, are is the simple solution.
first stop the running MySQL server.
now run the MySQL server by skipping grant table so that MySQL can be accessed from localhost without password, to do this run below command :
/usr/bin/mysqld_safe --skip-grant-tables &
now connect MySQL server without password :
mysql --user=root mysql
and set the password for MySQL root :
update user set Password=PASSWORD('Set_Pasword_here') WHERE User='root';
now start the MySQL process with grant table again.