As a webmaster or developer, one of the most common tasks that you will perform is database creation. Nowadays, creating a MySQL database is a relatively easy task, as most web hosting control panels provide you with a wizard that will guide you through the process.
In this tutorial, you will see how to create a MySQL database using the three most popular control panels: cPanel, Plesk, and DirectAdmin.
How to Create a MySQL Database Using cPanel
cPanel is the industry’s leading control panel and is used by major web hosting providers such as Bluehost, Justhost and Hostgator. To create a MySQL database with cPanel, follow these steps:
- Log in to your cPanel account (which is usually located at http://www.yourwebsite.com/cpanel).
- Type “mysql” in the Find box and click the MySQL Database Wizard icon:

- On the next screen, enter the name for your database and click Next Step. The full database name will include a prefix that is automatically inserted by your web hosting provider (usually your username):

- To access the new MySQL database, you must create a user. Enter your preferred username and password and click Create User. As with the database name, your cPanel username will be used as the MySQL username prefix.
- On the next screen, you will be prompted to specify the access rights for the new MySQL user. Unless you want to restrict access to the database for any particular reason, check All Privileges and click Next Step to complete the creation of the database.
- If you wish to access your database remotely (from your desktop or from another website for instance), go back to the main page of your cPanel and click Remote MySQL. Enter the remote IP address and click on Add.
Your new MySQL database is now ready to use. To configure your web applications to use it, you will need to enter the full database name and username (including the prefix that was inserted automatically by cPanel).
With most cPanel web hosts, the MySQL hostname can be set to “localhost.” If that doesn’t work, contact your hosting provider to get the IP address of your database server.
How to Create a MySQL Database Using Plesk
Creating a MySQL database in Plesk is just as easy as it is to create in cPanel:
- Log in to your Plesk control panel (usually located https://www.yourwebsite.com:8443)
- Select the Websites & Domains tab at the top.
- Click on Databases and then on Add New Database.
- Enter the name for the new database name and click OK:

- Once the database is created, you must add a new MySQL user. Click on Add New Database User:

- Enter the name and password for the MySQL user account and click OK:

How to Create a MySQL Database Using DirectAdmin
While DirectAdmin is bit less popular than cPanel and Plesk, it is a quite efficient control panel. Creating a MySQL database using DirectAdmin is easy:
- Log in to your DirectAdmin control panel (usually located http://www.yourwebsite.com:2222).
- Click on MySQL Management:

- Click on Create new Database at the top.
- Enter the new database name, the MySQL user name, and password and click Create.

Alternately, if you have root access to your web server, you can always opt to create your MySQL databases manually.

Stephane is a web developer and system administrator with over 18 years of experience. Specialized in PHP programming and Linux server administration, he also provided development and consulting services to SMBs for several years before becoming an online entrepreneur.
0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.
Leave a Comment