|
Recover MySQL Database root password |
|
|
Nov 02, 2007 at 10:14 PM |
|
1. Login as root 2. Stop the MySQL server by using command /etc/init.d/mysql stop 3. Start MySQL server without password mysqld_safe --skip-grant-tables & 4.Connect to mysql server using mysql client mysql -u root 5. Now you need to Setup new MySQL root user password mysql> use mysql; mysql> update user set password=PASSWORD(”newrootpassword”) where user=’root’; mysql> flush privileges; mysql> quit 6. Restart MySQL /etc/init.d/mysql stop /etc/init.d/mysql start {mosgoogle}
|