Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.

1 Answer 1

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:

http://dev.mysql.com/doc/refman/5.1/en/resetting-permissions.html

share|improve this answer

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