Mon 27 Nov 2006
Change MYSQL Root Password
Posted by Dave under MySQL Tutorials , Web Hosting , Web Hosting ArticlesForgot the MySQL root password :
First you will have to stop the MySQL service on the server.
# service mysqld stop
Start MySQL as
# /usr/bin/safe_mysqld –skip-grant-tables &
Or
# /usr/bin/mysqld_safe –skip-grant-tables &
safe_mysqld is a script that starts mysqld and traps any forceful terminationof the MYSQL server and it privents any database corruption.
Change the password for root user as
# mysql -u root mysql
First you will have to stop the MySQL service on the server.
# service mysqld stop
Start MySQL as
# /usr/bin/safe_mysqld –skip-grant-tables &
Or
# /usr/bin/mysqld_safe –skip-grant-tables &
safe_mysqld is a script that starts mysqld and traps any forceful terminationof the MYSQL server and it privents any database corruption.
Change the password for root user as
# mysql -u root mysql
mysql> UPDATE user SET Password=PASSWORD(’new_password’) WHERE user=’root’
mysql> FLUSH PRIVILEGES;
mysql> exit;
Start the MySQL service:
# service mysqld start
2 Responses to “Change MYSQL Root Password”
Leave a Reply
You must be logged in to post a comment.



















December 12th, 2006 at 5:08 pm
your command helped me
in lot, no other site have given
as clear as you have given;
December 13th, 2006 at 1:28 pm
Yep, it help a lot, I found many useful info and relevant tutorial in this blog. Very good work indeed!