Lost Database Password

If you’ve forgotten the password to your MySQL database user, you may create a new user with a new password, and then assign that user to the database.

This will not remove or change any of the data in your database.

As an alternative to resetting the MySQL password, you may find the existing password in your site’s configuration file. If you are sure where to find the configuration file, please check our following article: Location of Script Configuration Files.

Create a New User:

Log into cPanel.
In the Databases section, click MySQL Databases.
Find the MySQL Users section of the MySQL Databases tool.
Under Add New User, enter a username.
In the Password field, enter a password.
Retype the password in the Password (Again) field.
Click Create User.

Assign New User to Database:

Under Add User to Database, select the newly created user from the User drop-down menu.
From the Database drop-down menu, select the existing database for which you want the password reset.
Click Add.
From the MySQL Account Maintenance screen, select the privileges you wish to grant the user or select ALL PRIVILEGES.
Click Make Changes.