Our highest priority is to satisfy the customer through early and continuous delivery of valuable and working software.

Friday, April 27, 2007

Reset MySQL incase of LOST of Password

In case of MySQL password LOST...

(1)service mysql stop
# wait until MySQL shuts down. Then run

(2)mysqld_safe --skip-grant-tables &
# then you will be able to login as root with no password.

(3)mysql -uroot mysql
# In MySQL command line prompt issue the following command:

UPDATE user SET password=PASSWORD("abcd") WHERE user="root";
# At this time your root password is reset to "abcd" and MySQL will now
know the privileges and you'll be able to login with your new password:

(5)mysql -uroot -pabcd mysql

No comments:

Post a Comment