Lost Database Password
Lost Database Password:
If you've forgotten 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. This will not erase or change any of the data in your database.
As an alternative to resetting the MySQL password, you may be able to find the existing password in your site's configuration file.
Create a New User
- Log into cPanel.
- In the Databases section, click MySQL Databases.
- Locate the MySQL Users section of the MySQL Databases tool. To quickly find this section, click Jump to MySQL Users.
- Under Add New User, enter a username. Be sure that the username is 7 letters or shorter.
- 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 need 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.
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, the site's configuration file needs to be updated. Once the configuration file has been updated to reflect the new database username and password, the site should work as it was prior.
Was this answer helpful?
Upload to an Addon or Subdomain in cPanel: Option 1 In a FTP client enter this information....
Upload a File using the File Manager in cPanel: You can upload your files directly through...
Create and Delete a Cron Job in cPanel: Cron jobs run scheduled commands at specific times. The...
Document Root Folder: The document root is the folder where the website files for a domain name...
PHP Configuration Plugin in cPanel: If you ever encounter problems with the way your server...