Does anyone know the password for this database?

Those that I work with know that my first, and primary, job is as a MySQL DBA. Unfortunately, cause I love MySQL, I haven’t been doing as much with it lately because of all the virtualization work going on.

Today I’m going to post about MySQL. Occasionally you may encounter a MySQL server that has been around for a while, and no one knows who set it up, where it came from, or who owns it. Those wonderfully inaccessible databases are still someone’s responsibility. So, what do you do if you don’t know the root password? Well, it’s actually not all that difficult, assuming you can start and stop the instance a few times.

First we need to stop the mysql instance. I’m a *nix admin, so I’m presenting those commands. If you’re responsible for a windows server (sorry for that), you’ll have to figure out how to stop and start the instance using the service control panel.

You should now be able to connect in the normal way using the newly set root password.

Leave a Reply