Skip to main content

How to Map an Existing Database to a cPanel Account

A server administrator can map an existing MySQL or MariaDB database to a specific cPanel account using WHM. This process links a database that already exists on the server to a user's account, allowing the user to manage that database from their...

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

  1. Log in to WHM.

  2. Navigate to SQL Services > Edit MySQL Databases.

  3. Select the cPanel account from the dropdown menu or search for the account name.

  4. Locate the Add a MySQL Database section.

  5. Enter the name of the existing database in the New MySQL Database field.

  6. Enter the desired username for the database.

  7. Select the appropriate Privilege level (typically Local_All_Privileges or Root depending on the intended access).

  8. 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.

Did this answer your question?