Search Our Database
How to change database password in WHM
Introduction
Changing a MySQL user password is an essential task for maintaining database security and ensuring proper access control within your server environment. WHM (Web Host Manager) offers a straightforward interface to update MySQL user credentials without needing to access the command line. This guide will walk you through the steps to securely change a MySQL user password via WHM, helping you manage your SQL services more efficiently.
Prerequisites
- Have access to WHM panel
- Database user(s) already existed
- Basic understanding on MySQL
Step 1 : Login to WHM
- You need to login to WHM as you need the root access
Step 2 : Navigate to Change Database User Password
- Use the search bar on the top right to search for Change Database User Password. Click on Change Database User Password.
Step 3 : Change the password
- Choose the Database User you want to change the password for. Then, enter your desired password and re-type it to confirm the new password. Once confirmed, click on Change Password.
- A message will appear once you have successfully changed your database password.
Step 4 : Test out the new password (optional)
- To ensure the new password that you have changed is correctly configured, you may test the new it out on WHM’s Terminal.
- Log in to the MySQL or MariaDB console with mysql -u username -p (change username with the database user you have changed the password for)
- If the password is correct, this is the expected output :
[root@ip-address ~]# mysql -u irfan -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 29992 Server version: 8.0.42 MySQL Community Server - GPL Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
Conclusion
By following the steps outlined above, you can successfully change the password for any MySQL user directly from WHM. Remember to update any application or website configurations that use the affected credentials to prevent connectivity issues. Regularly updating database passwords and managing user access is a key part of securing your server and maintaining reliable operations.
Should you have any technical inquiries, feel free to contact us at support@ipserverone.com