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?)