I have forgot my database password. How can I change it?

Question:

I’ve forgot my database password. What are my options?

Answer:

If you have forgot your database password and do not have any scripts that depend on it, you can change your password via the database section of your control panel. Just click on the link that says “Change Database Password”. Do not log-in to phpmyadmin to change your password.

However things become much more complicated if you have scripts (wordpress, joomla, drupal, etc.) that rely on the password. If you change your password it will break those scripts. Unfortunately, even server admins not have access to your existing database password (the passwords are encrypted and not easily decrypted).

The best option if your scripts depend on your password is to search the scripts for the password. If you know the location of the password this is easy. For example, wordpress stores your password in wp-config.php.

If you do not know where the password is stored, use something like the following to find it:

find . -name "*.php" -exec grep "localhost" {} ; -print
find . -name "*.inc" -exec grep "localhost" {} ; -print
find . -name "*.php" -exec grep "3306" {} ; -print
find . -name "*.inc" -exec grep "3306" {} ; -print

These search through common php file extensions and search for the strings “localhost” and “3306” which are usually close to the location of your password. You can also search for the term “password” or “pass” but will likely get a lot of false positives.

If you are not comfortable doing the above, our support staff can find your password for a one-time fee of $25. Contact support with your request.

Leave a Reply

Your email address will not be published. Required fields are marked *