Create account Login Webmail Contact Us



 
Knowledgebase
How to reset MYSQL passwd if lost.
Posted by Mike C. on 12 September 2009 12:04 AM
First you are going to need to stop mysqld from running so find the pid with "ps aux" and kill -9 PID. Then you can start mysqld with --skip-grant-tables option. Login to mysql as follows:

# mysql -u root -p mysql

Then at the mysql prompt type:

UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
FLUSH PRIVILEGES;


and replace 'password' with the pass you want to set it to.
(420 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments: