How to reset a database password within cPanel

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:

  1. Log into your cPanel
  2. Under the Databases heading, click the MySQL Databases link
  3. 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)

    change user password

  4. 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

0 thoughts on “How to reset a database password within cPanel

    1. The article is ok, but the solution doesn’t work for me. I can’t connect to the database from control panel, hence I can’t get pass step 2.

Was this article helpful? Join the conversation!

Shop the Black Friday Sale
Hurry! These Deals Won't Last Long