There may be times that you need to reset a database password. For example, you may be resetting the password as a normal maintenance / security precaution. If you’re troubleshooting database connection errors, resetting your database password is a good step to take so you can be confident you are using the correct password.
In the following tutorial, we will walk you through the steps for resetting your database password using cPanel. If you by chance don’t host your website with InMotion Hosting or your current hosting provider does not use cPanel, be sure to contact your current hosting provider for the proper steps for resetting database passwords within their system.
Reset a database password within cPanel:
- Log into your cPanel
- Under the Databases heading, click the MySQL Databases link
- A database does not have a password to reset, but instead we are needing to reset the password for the user assigned to the database.
At the bottom of the page, under the Current Users, look for the user of the database then click on the Set Password icon in the Actions column. Remember that the database user you are modifying should be the assigned user for the database that requires the password change.
If you don’t know the database user assigned to your database, please look for the user in your software’s configuration.php file (such as wp-config.php or configuration.php)
- On the MySQL Account Maintenance page, enter the old password for the user and then enter the new password you would like. When finished, click the Change Password button.If you don’t recall the current password for your MySQL user, you have two options:
* Find the database password listed in your software’s configuration file (such as wp-config.php or configuration.php) and try that
* Delete the database user, recreate the database user with the password you would like, and then assign the user to the database once again