LinuxHelps.com

A blog for Linux Lovers.

10
Mar 2009
Mysql root password reset.
Posted in Mysql by sibu at 9:48 am |

To reset MySQL root Password

1. Kill/Stop the MySQL Service
# pkill mysql / /etc/init.d/mysqld stop

2. Start mysql in safe mode
# safe_mysqld –skip-grant-tables & [OR]
# mysqld_safeĀ  –skip-grant-tables &

3. Connect to mysql
# mysql mysql

4. Update the root user Password
mysql> UPDATE user SET Password=PASSWORD(’New_Password’) WHERE Host=’localhost’ AND User=’root’;

5. Exit and kill mysqld_safe / safe_mysqld
# pkill mysqld_safe / safe_mysqld

6. Start the MySQL Service
# /etc/init.d/mysql start

7. Connect to your Mysql
# mysql -u root -p
Enter Password: Specify your New_Password


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply