Tutorial: How do I create a MySQL database?

One of the most used tools in your web hosting package is MySQL databases. MySQL databases store data from your web sites, and PHP scripts and is very important for running a web site. Sometimes when you are trying to install a PHP script, you are required to create a MySQL database and a MySQL username/password. We are going to walk you through this process.

1. First, login to your cPanel account.

2. Scroll down to the “Databases” section of your cPanel account.

3. Click on the option “MySQL Databases”

4. The first option you should see is “Create a Database” . Put the name you would like in the text box and hit create.

5. Now scroll down to the section MySQL users, and the option to “Add new user”. Type your desired username in the box, and enter your desired password in the password box (We strongly recommend using the password generator option so that your password is very secure and cannot be easily guessed or hacked, however if you don’t use the password generator be sure to use a very secure password). Now click the “Create User” button.

6. Now you need to add permissions to the new user account. Go down to the option “Add user to database”. Pick the MySQL database you created, and the user you made from the drop down boxes and click the “Add” button.

7. You are done creating and adding user permissions to your MySQL database. Remember that when you are inputting your MySQL username and database name in configuration options in PHP scripts, you use the format “cpanelusername_databasename” and “cpanelusername_username”, where you replace cpanelusername with your cPanel username and you replace databasename with the database name and username with the MySQL username.

Leave a Reply