Lost Database Password | HostGator Support
  1. Knowledge Base
  2. >
  3. Results
  4. >
  5. Lost Database Password

Lost Database Password

Website software such as WordPress and Drupal or database management software such as Workbench requires a database user and a password for users to access your database. If you have forgotten the password for your database user, you can set a new password inside cPanel.

Note: As an alternative to resetting the MySQL password, you may be able to find the existing password in your site's configuration file. If you are unsure where to locate the configuration file, please refer to our list of different scripts to find its location in the following article:


Setting a New Password for your MySQL User

Follow these steps to set a new password for a MySQL database user:

  1. Log in to cPanel.
  2. Click MySQL® Databases in the Databases section.

    HostGator cPanel MySQL Databases

  3. Scroll down at the bottom and look for the Current Users section.

    HostGator cPanel MySQL Current Users

    Tip: You may also locate the MySQL Users section by clicking Jump to MySQL Users.

    HostGator MySQL Jump to MySQL Users

    Note: If you do not know which user to edit while making changes to a website, you may view the user the site is connecting with its configuration file:
  4. Look for the MySQL user you want to update and click the Change Password next to it.

    HostGator MySQL Change Password

  5. Enter the new password in the Password field. The Password Strength Meter on the page will identify the strength of the password.

    HostGator MySQL Set Password

    Note: You may use the Password Generator to generate a random and secure password.
  6. Click the Change Password button when finished.

Re-Configuring Your Code

If you need to reset the password to fix a website installation, the site's configuration file needs to be updated. Once the configuration file has been updated to reflect the new password, the site should work as it was prior.

Check the following article if you are unsure of where your configuration file is and need help locating the file you need to edit the database password: