X
  1. Home
  2. Databases
  3. How do I create databases via cPanel?

How do I create databases via cPanel?

To create databases, begin by logging on to cPanel. Once there, you can create databases in two ways: either via a wizard accessible via the icon MySQL Database Wizard, or manually via the icon MySQL Databases.

The manual method might be suitable if you already have a database for which you want to create an additional user. Otherwise, the guided method will be quicker.

External database access

If you need to access the database from another server than the one you’ve created it at, you need to allow remote access. Please refer to these instructions for more information.

Via the MySQL Database Wizard

  1. Begin by logging on to cPanel.
  2. Click the icon MySQL Database Wizard under Databases.
  3. First, enter a name for the database in New Database. The name will always be based on your cPanel username, so you select the last part of the name here. In our example, we can select the part of the name following exempel_. Then click Next Step.
  4. Then, it’s time to create a user with access to the database. Choose a Username and a Password. The database username will always begin with your cPanel username (just like the database name). Enter the password twice and click Create user.
  5. Grant the user privileges on the database. Most often you wish to grant all. Then click Next Step.
  6. And you’re done! You may now start using the database with the credentials you selected above.

Manually

Begin by logging on to cPanel.

Once there, click the icon MySQL Databases under Databases.

Creating a database

First, you need to create a database and select a name for it under Create New Database. The name will always be based on your cPanel username, so you select the last part of the name here. In our example, we can select the part of the name following exempel_.

Creating a database user

Now, create a database user unless you already have one from earlier. Under Add New User you can enter the credentials for a new database user, then click Create User.

Add a user to a database

Finally, you need to add the user to the database you’ve created. Under Add User To Database, you select the user and the database you wish to connect, then click the Add button.

Now you will get to grant privileges for the user on the database. The most common is to grant all privileges, e.g. in various CMSes such as WordPress and Joomla, you’ll need to grant all for everything to work properly. You can read more about MySQL privileges here. Confirm your choices with the Make Changes button. Your database and user are now ready to be used.

Was this article helpful?

Related Articles