# Resetting the MySQL root password in WHM

> Reset the MySQL root password on your server from WHM, and understand how it differs from the server's root password.

Source: https://helpcenter.ruachost.com/vps/whm/resetting-the-mysql-root-password-in-webhost-manager-whm/

The **MySQL root password** is required to access and manage databases at the server level. If you forget this password or need to update it for security reasons, WHM provides a simple way to reset it.

## Important Notes

- You must have **root access** to the server to reset the MySQL root password.
- The MySQL root password is **different** from the server’s root account password.
- Resetting the password only affects the **MySQL root user**, not other system users.

## Steps to Reset the MySQL Root Password

1. **Log in to WebHost Manager (WHM).**
2. In the search box (top left), type **mysql root**.\
   ![WebHost Manager - MySQL Root Password](https://helpcenter.ruachost.com/kb-images/9c8bb1165461.webp)
3. Click **MySQL Root Password** when it appears.\
   ![WebHost Manager - MySQL Root Password page](https://helpcenter.ruachost.com/kb-images/9bc4a547b2cd.webp)
4. In the **Password** and **Password (again)** fields, enter the new password.

   - Alternatively, click **Password Generator** to create a strong, random password.
5. Click **Change Password**. The new MySQL root password takes effect immediately.

## Verifying the Change

- Try connecting to MySQL from the command line:

  ```bash
  mysql -u root -p
  ```
- Enter the new password when prompted.
- If successful, you’ll gain access to the MySQL shell.

> **Note:**
- Applications or scripts that use the MySQL root password may need to be updated with the new credentials.
- Always store the new password securely.
- Consider using a password manager to avoid future lockouts.
