Print

How to create a MySQL database in cPanel

  • mysql, phpmyadmin, php version, php memory limit, database backup, php tuning, database
  • 0

Create a MySQL database

Almost every web application - WordPress, Joomla, Magento, custom PHP apps - needs a MySQL database to store its content. This guide walks you through creating a database, a user, and granting the user access to the database.

Step-by-step

  1. Log in to cPanel (see How to access cPanel ).
  2. In the Databases section, click MySQL Databases.
  3. Under Create New Database, type a database name (e.g. wordpress). cPanel prefixes it with your account username automatically, so the full name becomes youraccount_wordpress. Click Create Database.
  4. Scroll down to MySQL Users → Add New User. Pick a username (e.g. wpuser) and a strong password. Use the Password Generator button. Click Create User.
  5. Scroll down to Add User To Database. Pick the user and database from the dropdowns. Click Add.
  6. You will be asked which privileges to grant. For most apps, tick ALL PRIVILEGES. Click Make Changes.

The four pieces of info you now have

Most app installers ask for these:

  • Database name: youraccount_wordpress
  • Database user: youraccount_wpuser
  • Database password: what you generated
  • Database host: localhost

Skip all this with Softaculous

If you are installing WordPress (or any other supported app), Softaculous creates the database, user and password automatically. See Install WordPress via Softaculous .

Hosting with MySQL included Need help with database setup?

Need a hand?

The Trinico Cloud team is in South Africa and replies during local business hours. Reach us via WhatsApp, e-mail or a support ticket - whichever suits you best.

Contact us Open a support ticket


Was this answer helpful?

« Back
Loading