Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Today I realized that I forgot the MySQL password, or that somebody else changed it (I doubt it).

Is there any possibility that I can get the root password?

I have access to all the machine (as it's mine), don't think that I'm trying to hack into someone else database or w/e.

I'm desperate, I've trying with a lot of different passwords, no luck so far.


share|improve this question
up vote 1 down vote accepted

Restart MySQL with skip-grant-tables in your config, change the password, then restart again after taking skip-grant-tables back out.

Oh, and if you have an internet exposed MySQL listener (which you really shouldn't), then you need to change that (bind-address = before you do this.

share|improve this answer
Thank you very much, it worked, you saved my life! – user2077474 Nov 27 '13 at 3:48

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.