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

This question already has an answer here:

I was trying to change the password for a user on a mysql server, and i appear to have locked myself out.

I have access to the root user, but root doesn't have the privileges to access any databses, including the 'mysql' database where all the config is kept.

Is there any way i can 'reset' the root user? (i have full file-system access) ... or do i just need to reinstall (can i salvage my data?)

Thanks. -Ped

share|improve this question

marked as duplicate by Chris S Mar 20 '13 at 5:47

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I believe that restarting MySQL with the --skip-grant-tables options will allow you to enter the database as root, where you can then fix the permissions in the mysql and all other databases.

This is sorta, kinda similar to resetting the root password if you forgot it:

share|improve this answer

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