Applies to: All plans.
Before you start: You need access to cPanel for the hosting account you want to add a database to. Log in via single sign-on from your client area (open the service, then Log in to cPanel), or go to https://yourdomain/cpanel.
A MySQL database stores the content for apps like WordPress, Joomla and most CMS or e-commerce platforms. To use one, you create three things: the database, a database user, and the privileges that connect the user to the database. This guide covers all three in cPanel.
Step 1: Create the database
- In cPanel, open Databases -> MySQL Databases.
- Under Create New Database, type a short name (for example
myapp). - Select Create Database.
Result: cPanel adds your account prefix to the name (for example
cpuser_myapp). Write down the full name shown — you will need it later.
Step 2: Create a database user
- Still on the MySQL Databases page, scroll to MySQL Users -> Add New User.
- Enter a username, then set a strong password (use the password generator if you like).
- Select Create User.
Result: A new user is created, again with your account prefix (for example
cpuser_dbuser). Note the full username and password.
Step 3: Add the user to the database and assign privileges
- Scroll to Add User to Database.
- Pick your User and your Database from the two dropdowns, then select Add.
- On the privileges screen, tick ALL PRIVILEGES for a standard app like WordPress, then select Make Changes.
Result: The user can now read from and write to the database. You will enter these four details into your application: database name, database username, password, and host (
localhost).
Your database limit by plan
Each plan allows a set number of MySQL databases:
| Plan | Databases |
|---|---|
| Self-Managed Lite | 2 |
| Self-Managed Plus | 10 |
| Self-Managed Pro | Unlimited |
| Managed Starter | 10 |
| Managed Growth | 25 |
| Managed Business | Unlimited |
If you reach your limit, you can add +5 databases as a configurable option (€1.50/mo) from your service in the client area, or upgrade your plan. See Understanding your hosting account's limits.
Troubleshooting this task
- "You have reached your maximum number of databases." You are at your plan limit. Delete an unused database, add the +5 databases option, or upgrade your plan.
-
App cannot connect. Re-check the database name, username and password (all carry your account prefix) and make sure the host is
localhost. For WordPress specifically, these live inwp-config.php— see Fixing "Error establishing a database connection". - Need to browse or edit tables. Use Databases -> phpMyAdmin in cPanel. See How to use phpMyAdmin.
Comments
0 comments
Please sign in to leave a comment.