Reset the password for mysql root user
You will get the password for mysql root user under /root/.my.cnf
#cat /root/.my.cnf
e.g
root@host[/]# cat /root/.my.cnf
[client]
user="root"
pass="modernbill99"
root@host [/]#
Please follow following steps to reset the root password.
#service mysqld stop
#killall -9 mysqld
#safe_mysqld --skip-grant-tables & *// it will start mysql in safe mode in background. \\*
<hit Entre Key>
root@host [/]#mysql
mysql>FLUSH PRIVILEGES;
mysql>GRANT ALL PRIVILEGES ON *.* TO root@localhost IDENTIFIED BY 'modernbill99' WITH GRANT OPTION;
mysql>FLUSH PRIVILEGES;
mysql>\q
root@host [/]# service mysql stop
root@host [/]# service mysql start.
|