Before you begin
You will need:
Root access to the WHM interface
The exact name of the existing database
The exact username of the cPanel account
The specific database name as it currently exists on the server
Mapping the database to a cPanel account
Log in to WHM.
Navigate to SQL Services > Edit MySQL Databases.
Select the cPanel account from the dropdown menu or search for the account name.
Locate the Add a MySQL Database section.
Enter the name of the existing database in the New MySQL Database field.
Enter the desired username for the database.
Select the appropriate Privilege level (typically Local_All_Privileges or Root depending on the intended access).
Click Add New Database.
Note: If the database already exists on the server, the system will recognize the name and link the existing database to the selected account rather than creating a new one.
Confirm the result
The database will now appear in the cPanel account's MySQL Databases section.
The user will be able to manage the database and its associated users from their cPanel dashboard.
The database name and username will appear in the list of databases under the specific account in WHM.
Limitations
This procedure only maps the database; it does not automatically migrate data or change the database's internal configuration. If the database was previously associated with a different cPanel account, it must be removed from that account before it can be mapped to a new one.
