How to change your MySQL root password in WHM

Managing databases is an important aspect of web hosting and maintaining security. One of the most fundamental steps in securing your MySQL databases is ensuring the root password is strong and changed regularly. WHM stands for Web Host Manager provides a user-friendly interface to manage various aspects of your hosting account including MySQL.

In this article, we will explore the process of changing the MySQL root password in WHM to prevent unauthorized access.

Getting Started

WHM is a powerful tool used by web hosting providers to manage host accounts on a server. MySQL is a popular open-source relational database management system. The root user in MySQL has full administrative privileges so it is essential to keep the root password secure.

Preparing Changes

Before change MySQL root password WHM it is important to take a few preparatory steps:

  1. Always backup your MySQL databases before making changes. You can use tools like phpMyAdmin or mysqldump for this purpose.
  2. Ensure you have root access to WHM, as changing the MySQL root password requires administrative privileges.

Steps to Change MySQL root password

The steps to reset MySQL root password WHM are discussed below:

Login into WHM

Open your preferred web browser. Navigate to your WHM login URL. This is typically https://yourdomain.com:2087 or https://your-server-ip:2087. Enter your WHM root username and password to log in.

WHM login

MySQL Root Password Change

Once logged in, follow these steps to WHM MySQL password change:

In the WHM search bar, type “MySQL” to quickly find the MySQL related options.

mysql WHM

Click on the “MySQL Root Password” link under the SQL Services section.

In the “MySQL Root Password” page enter your new desired password. Ensure it is strong by using a mix of uppercase, lowercase, numbers, and special characters.

Change root password

Re-enter the new password to confirm it. Click the “Change Password” button.

Verifying Changes

After changing the password, it’s essential to verify that the change was successful:

Use the command line or a MySQL client like phpMyAdmin to log in with the new root password.

phpmyadmin

Run a few queries to ensure the databases are accessible and functioning correctly.

Update Applications and Scripts

After changing the MySQL root password, you need to update any applications or scripts that use the root password to connect to the database:

Locate the configuration files of your applications, common files include config.php, .env, or similar. Replace the old root password with the new one in these files. Restart any web services or applications to apply the changes.

Best Practices

Changing the MySQL root password is an excellent step toward securing your databases. Here are a few additional tips:

  • Change your root password regularly.
  • Always use complex and unique passwords.
  • Restrict root access to only necessary users and IP addresses.
  • Use monitoring tools to keep an eye on database activities and detect any suspicious behavior.

Conclusion

Changing your MySQL root password in WHM is a straightforward process that significantly enhances your database security. By following the steps outlined in this guide, you can ensure your MySQL databases remain secure and your hosting environment remains robust. Regularly updating your passwords and adhering to security best practices will help protect your data from unauthorized access.

Setting up multiple cPanel accounts can be a time-consuming task for busy website business owners. For those offering individual cPanel accounts to their clients consider Ultahost’s reseller hosting which provides you root access and WHM control panel access allowing you to easily manage your client’s cPanel accounts.

FAQ

What is the MySQL root password?
Why should I change the MySQL root password in WHM?
Can I change the MySQL root password directly in WHM?
Where do I find the option to change the MySQL root password in WHM?
What happens if I forget my MySQL root password?
Do I need to restart MySQL after changing the root password?
Is it safe to change the MySQL root password while the server is running?

Related Post

SSH Key vs Password Based Authentication

Authentication plays a pivotal role in upholding securi...

How to Run SQL Queries in phpMyAdmin

phpMyAdmin a free and open-source web application serve...

How to Manage Databases with SSH Command Line

SSH stands for Secure Shell is a powerful network proto...

How to Fix the XAMPP Error “MySQL Shutd

XAMPP is a software package that allows users to set up...

File Manager vs FTP

Handling files on a website can pose a considerable cha...

How to Delete MySQL Database & User from

Deleting a MySQL database and user from cPanel is impor...

Leave a Comment