Create the database container in cPanel before installing or importing an application that needs MySQL or MariaDB. A new database starts without your application's tables. You will also need a database user with appropriate privileges before the application can connect.
Manage My Databases was named MySQL Databases in cPanel & WHM 118 and earlier. Database Wizard can guide you through creating both the database and its user.
Before you start
- Check that the hosting plan allows another database and identify the application that will use it. Choose a short, descriptive name that follows the on-screen requirements.
- Use cPanel's database tools rather than phpMyAdmin to create databases and users, so cPanel can manage their ownership and backups correctly.
Instructions
Open database management
Sign in to cPanel and open Databases, then Manage My Databases. Older versions call this MySQL Databases.
Enter a database name
Find New Database and enter the name. If cPanel displays an account prefix before the field, enter only the remaining part; cPanel adds that prefix automatically.
Create the database
Click Create Database and wait for the result. Return with Go Back and locate the new entry in Current Databases.
Record the complete name
Copy the full name shown in Current Databases, including any account prefix. Your application must use that complete name, not just the part you typed.
Provide application access
Create or select a dedicated database user, add it to this database, and grant the privileges required by the application. Then install the application or import its database data.
Check the result
- Confirm the database is listed under the intended cPanel account and the correct user is assigned.
- Test the application's connection using the complete database and user names and the host specified for your hosting setup.
Troubleshooting
- The database name is rejected.
- Check the name, any automatic prefix, the displayed length limits, and whether that database already exists. Do not keep adding the prefix twice.
- The website cannot connect.
- Check the configured database name, user, password, host, and assigned privileges. Creating a database alone does not grant a user access.
Watch the video
The video may show an older interface. Use the written instructions above when screen names differ.
Continue with a related task
- How to Create a Database User in cPanel
- How to Add a User to a Database and Set Privileges in cPanel
- How to Import a Database with phpMyAdmin in cPanel