MySQL root password recovery is very easy and can be done by logging as a root user in Linux
Quote:
1) Stop the database process: /etc/init.d/mysql stop
2) Start MySQL in safe mode and skip the use of the "grant tables": /usr/bin/mysqld_safe --user=mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &
3) Reset the MySQL root password: mysqladmin -u root flush-privileges password newpassword
4)Stop MySQL running in safe mode: kill `cat /var/run/mysqld/mysqld.pid`
5) Start MySQL: /etc/init.d/mysql start
6) The new MySQL root password can now be used: mysql -u root -p
Respond with the password: newpassword
|
Hope this helps !