How to create a database through cpanel

Cpanel databases

Cpanel is a great system that allows us to easily administer our websites. But one caveat to creating databases is that it should be done through cpanel. If you create the database outside of cpanel and then add a new user to that database, you're still not guaranteed that the database will appear in the cpanel account. The reason for this is that cpanel uses an extra step when creating databases. So the rule is that you should always create your databases through cpanel to ensure it is created correctly.

How to name our cpanel database

We generally name our databases cpaneluser_website. Cpanel forces the cpanel username to prefix the database name and we stick with this convention. It does allow us to identify which databases apply to which websites and helps avoid conflicts. We use the name website as we believe it is a website's database and should be named as this.

Single databases

We tend you use a single database for our websites even if two systems are running. For example if a website has Magento and Wordpress installed, we would still use just the single database for this so the connection can be the same for both. If you find a website with two databases, it will generally mean we didn't create it and most likely have obtained it from a client who had it built by another company. If you prefix both systems such as magento_ and wp_ you will make managing the tables a little bit easier whilst avoiding conflicts.

How to create a database in cpanel summary

  1. Login to your cpanel account by visiting yourdomain.com.au/cpanel.
  2. Click on Mysql Databases.
  3. Type in website and click Create Database to create a database named cpaneluser_website.

How to create a database in cpanel

  1. Login to your cpanel account by visiting yourdomain.com.au/cpanel.
  2. Click on Mysql Databases.cpanel mysql databases
  3. Type in website and click Create Database to create a database named cpaneluser_website.cpanel mysql create new database