Databases

How to Create a MySQL Database in cPanel

Create a MySQL database and user for WordPress, Joomla, or any database-driven application.

Most web applications (WordPress, Joomla, WooCommerce) require a MySQL database. Here's how to create one in cPanel.

Step 1: Open MySQL Databases

Log in to cPanel → Databases → MySQL Databases.

Step 2: Create the Database

Under "Create New Database," enter a name for the database (e.g., mysite_db) and click Create Database.

Note: cPanel automatically prepends your account username, so "mysite_db" becomes "username_mysite_db".

Step 3: Create a Database User

Scroll to "MySQL Users." Enter a username (e.g., mysite_user) and a strong password. Click Create User.

Step 4: Add User to Database

Under "Add User to Database," select the user and the database, then click Add. On the next screen, select All Privileges and click Make Changes.

Your Database Credentials

Save these — you'll need them when installing WordPress or other apps:

  • Database Name: username_mysite_db
  • Username: username_mysite_user
  • Password: (what you set)
  • Hostname: localhost

Tips

  • Use the MySQL Database Wizard (also in Databases) to do all of this in one guided flow
  • Never grant "ALL PRIVILEGES" to a database user you'll use externally
  • Use phpMyAdmin to import/export database content

Want us to handle it?

330 Hosting can do this for you.

Use the guide above if you want to do it yourself. If you would rather avoid breaking email, DNS, files, SSL, or WordPress, our support team can help.