Skip to content
HoganHost blog

Creating and Managing MySQL Databases in cPanel

Many websites store their content in a database. A database is an organized collection of information, such as blog posts, product listings, and customer orders. MySQL is the database system most cPanel accounts use. Your site reads from it and writes to it every time a page loads.

Creating a database takes three parts: the database itself, a user who can access it, and the permissions that link the two. This guide walks you through each part.

Open MySQL Databases

  1. Log in to cPanel.
  2. In the Databases group, click MySQL Databases.

Create a Database

  1. Find the Create New Database section.
  2. Type a short name for the database, such as shop or blog.
  3. Click Create Database.

cPanel adds your account name to the front of the database name, so the final name looks like youraccount_shop. Write the full name down, since your site’s settings need it.

Create a Database User

A user is the login your website uses to reach the database. Keep it separate from your cPanel login.

  1. Scroll to the MySQL Users section.
  2. In Add New User, type a username. cPanel adds a prefix to it, just as it does for the database name.
  3. Enter a strong password, or use the password generator.
  4. Click Create User.

Store the username and password somewhere safe. Your site’s configuration file will need them.

Link the User to the Database

  1. In the Add User To Database section, select the user from the first drop-down menu.
  2. Select the database from the second drop-down menu.
  3. Click Add.
  4. On the next screen, tick ALL PRIVILEGES, then click Make Changes.

Giving a user only the permissions it needs is safer, but for most websites ALL PRIVILEGES is the standard choice.

Manage Existing Databases

The list at the bottom of the page shows every database and user on your account. Use Delete to remove a database you no longer need. Deleting a database removes its data for good, so back it up first.

Need a plan with room for more databases? Compare HoganHost’s cPanel shared hosting plans to find the right fit for your site.

Share this article
Written by

Join the conversation.

Your email address will not be published. Required fields are marked *

Your next chapter starts here

Put your next big idea online.

The right hosting. A name of your own. A real team in your corner.

Explore Hosting