1. Home
  2. How To Change or Retrieve the cPanel Server MySQL Root Password

How To Change or Retrieve the cPanel Server MySQL Root Password

Introduction

You can easily reset/change your cPanel Server Node MySQL root password in WHM with just a few clicks. You can follow the below mentioned steps to change your cPanel Server Node MySQL root password :-

Steps

1. First logged into WHM, navigate to the search bar on the left-hand side of the page. Begin typing MySQL, the predictive text like MySQL will allow options to appear below.

2. Select MySQL Root Password from the menu list. This will open a page for you to change the MySQL root password.

3. Enter the password you want to update to, or use the Password Generator button to have one password created for you.

4. Once you’ve updated the MySQL root password and confirmed it, click “Change Password” to save your changes.

5. WHM Panel will restart MySQL and confirm that your password has been successfully changed.

Recovering the Root MySQL Password on a cPanel server

On servers running cPanel, the cPanel Server root MySQL credentials are stored locally in a file that only the root user can access. After you’ve connected to the server as root via SSH, you can view the MySQL Root credentials by running the following command:

# cat /root/.my.cnf

That should output a result containing the MySQL root password, which will appear similar to the following:

[root@e2e ~]# cat /root/.my.cnf [client] password=AVeryStrongPassword user=root

Make a note of the current MySQL Root Password.

Updated on November 23, 2020

Was this article helpful?

Add A Comment