Database users are used to provide websites and applications access to databases. This guide shows how to create a database user and give the user access to a database in cPanel.
Overview
In “Manage My Databases” you can create and manage users for MySQL and MariaDB databases.
This feature has several advantages. You can:
Create your own users for each database
Assign specific user rights
Change passwords if needed
Give users access to existing databases
Manage all database users from one place
When you finish this guide, you will know how to create database users, connect them to databases and manage existing users in cPanel.
Important information
Database users are separate from email accounts and administrator users on your website.
You need to create a database user before the user can be connected to a database.
⚠️ Important: If you lose your password to a database user, it may not appear in cPanel. You need to create a new password by changing the user's password.
Prerequisites
Before you start, make sure:
You have access to cPanel
You have access to “Manage My Databases”
You have created a database that the user should access
Step 1: Log in to cPanel
If your hosting service supports cPanel, you can log in directly from the landing page in the client area.
This is how you do it:
Find your hosting service under the list of active products/services
Click on the button "Log in to cPanel"
You are now automatically logged into cPanel without having to enter your username or password again
Step 2: Create a new database user
Go to Manage My Databases in cPanel.
Find the Add New User section.
In the Username field, enter the desired username.
Enter a secure password in the password field and confirm your password.
When the password meets the password strength requirements, click Create User.
You can also click on Password Generator to generate a secure password.
cPanel will confirm that the user is created and you can click Go Back to get back to the overview.
💡 Tip: Keep database username and password in a secure location. You need this information to connect the website or application to the database.
Step 3: Connect the user to a database
Once the user is created, it must be connected to the database it would have access to.
5. Find the Add User To Database section.
6. Select the desired user from the user list.
7. Select the database the user should have access to.
8. Click Add.
Step 4: Assign User Rights
You should now choose which rights the user should have in the database.
9. You can choose individual rights or provide full access by selecting ALL PRIVILEGES.
10. Click Make Changes to save the settings.
When the changes are saved, click Go Back to return to the database overview.
⚠️ Important: Use only the rights necessary if the database is used by multiple users or applications.
💡 Tips: For most WordPress installations and other common web applications, ALL PRIVILEGES are recommended.
Summary
You have now learned how to create database users and connect them to databases in cPanel.
By using separate database users and the right access rights, you can improve both the security and administration of databases in your hosting account.





