How to Create a MySQL Database in cPanel

Most websites (including WordPress, Joomla, and custom PHP apps) need a MySQL database. Here is how to create one in cPanel.

Step 1: Create the Database

  1. Log in to cPanel.
  2. In the Databases section, click MySQL Databases.
  3. Under Create New Database, type a name for your database (e.g., mysite_db). Note that cPanel will prefix it with your cPanel username (e.g., cpanelusername_mysite_db). Write down the full name.
  4. Click Create Database. You will see a success message.
  5. Click Go Back.

Step 2: Create a Database User

  1. Scroll down to MySQL Users.
  2. Enter a username (e.g., mysite_user). The full username will include your cPanel prefix.
  3. Set a strong password. Click Password Generator if you need help creating one.
  4. Click Create User.
  5. Click Go Back.

Step 3: Assign the User to the Database

  1. Scroll down to Add User To Database.
  2. Select your user and your database from the dropdowns.
  3. Click Add.
  4. On the Manage User Privileges page, tick the ALL PRIVILEGES checkbox.
  5. Click Make Changes.

Using Your Database in WordPress

When installing WordPress manually, you will need these details:

  • Database Name: the full name (e.g., cpanelusername_mysite_db)
  • Database Username: the full username (e.g., cpanelusername_mysite_user)
  • Database Password: the password you set
  • Database Host: localhost

Tip: Use phpMyAdmin (found in cPanel) to import or manage your database. Click phpMyAdmin, select your database from the left panel, and use the Import tab to upload a .sql file.

 

  • database user, database, phpMyAdmin, WordPress database, MySQL, cPanel
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Register a Domain in 5 Minutes

Getting online starts with a great domain name. Follow these simple steps to register your domain...

How to Change Nameservers of Your Domain

Changing your domain’s nameservers is essential when pointing your domain to a different hosting...

Uploading Files Using File Manager in cPanel

Uploading your website files is an essential step in going live. With cPanel's File Manager, you...

How to Access cPanel

cPanel is the control panel for your Hordanso shared hosting account. It is where you manage your...

How to Create an Email Account in cPanel

Creating a professional email address for your domain (e.g., [email protected]) takes less...

Powered by WHMCompleteSolution