Home/cPanel guides/MySQL databases

How to create a MySQL database in cPanel

Most apps need a database. The MySQL Database Wizard creates the database and its user and connects them, in one pass.

3 minutesWritten for the standard cPanel theme

Create the database and user

In cPanel:Databases›MySQL® Database Wizard
  1. Open the wizard

    In cPanel, find the Databases section and click MySQL® Database Wizard.

  2. Name the database

    Type a short name and click Next Step. cPanel adds your username in front, for example myuser_shop.

  3. Create the database user

    Type a username and a strong password (or click Password Generator), then Create User.

  4. Give the user access

    Tick ALL PRIVILEGES and click Next Step. The database is ready.

On the Meridian theme: open the Databases hub and click + Create database.

Connect your app

  1. Use these details

    Database host: localhost. Database name and username: the full names with the prefix, for example myuser_shop. Password: the one you just set.

  2. Manage tables in phpMyAdmin

    In the Databases section, click phpMyAdmin to browse tables, run queries, or import and export .sql files.

Tips and common problems

  • Always use the full prefixed name (myuser_shop, not shop). This is the most common cause of “access denied” errors.
  • Importing a big .sql file? If phpMyAdmin stops partway, open a ticket and we’ll import it for you.
  • Back up before big changes: JetBackup can restore a single database (see backups).

Questions

Can I connect to my database from my own computer?

Remote connections are closed by default for security. Use phpMyAdmin, or ask support about allowing your IP address with Remote MySQL.

MySQL or MariaDB?

Your apps see it as MySQL. Use the same settings either way.

See plans & pricing