How to Reset MySQL User Passwords in cPanel - Simple Guide
Table of Contents
What You Need to Know
Important Warning
When you change a MySQL password, your website will stop working until you update your website's configuration files with the new password. This is because your website stores the database password in files, and those files need to be updated manually.
Why Reset MySQL Passwords?
- For security reasons
- If you forgot the password
- If you think someone unauthorized has access
- Regular maintenance
Before You Start
What You'll Need
- Access to your cPanel account
- Knowledge of which websites use the MySQL user you're changing
- About 15-30 minutes to complete the process
Important Backup Step
Before changing any passwords, make a backup of your website files, especially configuration files. You can do this through cPanel ? Files ? File Manager.
Step 1: Access cPanel
Method 1: Through iFastNet Client Portal
- Go to
https://ifastnet.com/portal/clientarea.php
- Log in with your iFastNet account details
- Find your hosting service and click "Login to cPanel"
Method 2: Direct Access
- Go to
https://yourdomain.com/cpanel (replace "yourdomain.com" with your actual domain)
- Enter your cPanel username and password
- Click "Log in"
Step 2: Find MySQL Databases
- In cPanel, scroll down to the "Databases" section
- Click on "MySQL Databases"
- Scroll down to the "Current Users" section
- Find the user whose password you want to reset
Step 3: Reset the Password
- Next to the MySQL user, click "Change Password"
- Enter a new, strong password in the "Password" field
- Enter the same password again in the "Password (Again)" field
- Click "Change Password"
- You should see a success message
Creating a Strong Password
- Use at least 12 characters
- Include uppercase letters, lowercase letters, numbers, and symbols
- Don't use personal information or common words
- Consider using the password generator tool in cPanel
Step 4: Update Your Website Files
This is the most important step! Your website will be broken until you update these files.
For WordPress Sites
- Go to cPanel ? Files ? File Manager
- Navigate to your WordPress folder (usually
public_html)
- Find and edit the file called
wp-config.php
- Look for this line:
define( 'DB_PASSWORD', 'old_password_here' );
- Replace
old_password_here with your new password
- Make sure to keep the quotes around the password
- Save the file
Example:
// Before
define( 'DB_PASSWORD', 'myoldpassword123' );
// After
define( 'DB_PASSWORD', 'mynewpassword456' );
For Other Websites
Look for configuration files in your website folder that might contain the old password. Common file names include:
config.php
database.php
settings.php
.env
Update the password in these files the same way as WordPress.
For Custom Scripts
If you have any custom scripts or backup scripts that use the database, you'll need to update the password in those files too.
Step 5: Test Your Website
- Visit your website in a web browser
- Check that it loads properly
- Try logging into your admin area (WordPress admin, etc.)
- Test forms and other features that use the database
If Your Website Shows Errors
Common error messages after password changes:
- "Error establishing a database connection"
- "Database connection failed"
How to fix:
- Double-check that you updated the password correctly in your configuration files
- Make sure there are no extra spaces before or after the password
- Verify you used the complete username (usually includes your account name as a prefix)
Getting Help
iFastNet Support
If you need help:
- Support Portal: Go to
https://support.ifastnet.com/login.php
- First time? You'll need to register for a support account
- Existing users: Log in and create a support ticket
What to Include in Your Support Request
- Your domain name
- The MySQL username you're trying to reset
- Any error messages you're seeing
- What you've already tried
Alternative Support Access
You can also access support through your client portal at https://ifastnet.com/portal/clientarea.php
Quick Troubleshooting
My website won't load after changing the password
Check these things:
- Did you update the password in your
wp-config.php file (for WordPress)?
- Is the password exactly the same in both the MySQL user and your config file?
- Are there any extra spaces or characters in the password?
I can't find my configuration file
For WordPress: Look for wp-config.php in your main WordPress folder
For other sites: Look for files named config.php, database.php, or similar
I'm getting permission errors
Contact iFastNet support - you might not have the right permissions to change MySQL passwords.
Remember: Always backup your files before making changes, and test your website after updating passwords to make sure everything works correctly.