HostMonster Web Hosting Help

Resetting MySQL Database User and Password

If you forgot the password to your MySQL database user, you must create a new user with a new password, and then assign that user to the database. Do not worry, this will not erase or change any of the data in your database.

Instead of resetting your password, you may be able to find the existing password in your configuration file. If you are not sure where your configuration file is, check this list of different scripts to find its location: Location of Script Configuration Files

If needed, the following article will give you additional instructions on How to Create and Delete MySQL Databases and Users

Create a New User

  1. Log into the cPanel
  2. Click the MySQL Databases icon under the "Databases" category

    MySQL Database

  3. Locate the MySQL Users section of the MySQL Databases tool. To quickly find this section, click "Jump to MySQL Users".
  4. Under Add New User, enter a username.
    Note: The username must be 7 letters or shorter.

    Create MySQL Username

  5. Enter a password in the Password field.
  6. Retype the password in the Password (Again) field.

    Create MySQL Password

  7. Click Create User.

Assign New User to Database

  1. Under "Add User to Database", select the newly created user from the User drop-down menu.

    Add User to Database

  2. From the Database drop-down menu, select the existing database to which you need the password reset.
  3. Click Add.
  4. From the MySQL Account Maintenance screen, select the privileges you wish to grant the user, or select ALL PRIVILEGES.
  5. Click Make Changes.
You may remove the old user from the database by clicking the red "X" next to the user in the "Current Databases" table.

Re-configuring your code

Now that you have a new user and password for your database, you will need to update your configuration file. Update the file to reflect the new database username and password and your site should now be working as it was before.

Instead of resetting your password, you may be able to find the existing password in your configuration file. If you are not sure where your configuration file is, check this list of different scripts to find its location: Location of Script Configuration Files

Knowledgebase Article 26,768 views bookmark tags: database mysql password (updated 812 days ago)


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

I am prompted to set a new MySQL password. What does this mean and how do I change it? (updated 960 days ago)
Knowledgebase Article 63,912 views tags: connect database mysql password phpmyadmin username

This article will explain MySQL database and user creation and deletion, and explain how to assign a user to a database. (updated 46 days ago)
Knowledgebase Article 448,342 views tags: creation database mysql

How do I grant permissions to cPanel for my MySQL database administrator without giving them the domain password? (updated 2015 days ago)
Knowledgebase Article 81,316 views tags: access mysql password permission

Related Help Content

I cannot connect to my database locally or remotely, do I have the correct server, username and password? (updated 1886 days ago)
Knowledgebase Article 118,331 views tags: cannot connect mysql name

This article will explain how to connect your scripts to your MySQL databases. (updated 812 days ago)
Knowledgebase Article 25,077 views tags: database mysql scripts

How do I make my MySQL database compatible with the version you provide? (updated 2017 days ago)
Knowledgebase Article 80,894 views tags: database mysql

How can I connect to our MySQL database from Dreamweaver? (updated 1025 days ago)
Knowledgebase Article 96,323 views tags: connecting database dream mysql weaver

How do I change my Control Panel password? (updated 899 days ago)
Knowledgebase Article 135,596 views tags: change cpanel password passwords protect

How do I import a database using command line? (SSH) (updated 1001 days ago)
Knowledgebase Article 381,776 views tags: command database import line mysql phpmyadmin ssh

How do I import a backup of my database (.sql file) using phpMyAdmin? (updated 820 days ago)
Knowledgebase Article 127,256 views tags: database mysql phpmyadmin

What necessitates "Database Repair"? (updated 993 days ago)
Knowledgebase Article 97,686 views tags: corruption damaged database mysql postgres repair tables