Beginners guide to create MySQL database for wordpress installation

How to create MySQL database for wordpress installation - cPanel, phpMyAdminWordPress is a powerful content management system, an engine that runs on majority of websites. The point is, WordPress makes several tasks simple and one thing that it makes very simple is installing the software. You do not need any coding knowledge and most of the hosting companies offer you Fantastico, a popular tool that automatically setups wordpress in minutes. So the reality is such automation process makes people more oblivious, they do not know how wordpress works.

WordPress is a PHP (server side scripting language) based application that uses MySQL database to receive and store information. In short all your blog’s information such as posts, pages, comments, users, categories and tags that you create are stored in your database. Whenever a visitor is making a request wordpress obtains that particular information from MySQL database and presents them in a HTML output.

After you upload and unzip the wordpress file to your web server (very first step of wordpress installation), you will need to enter all the database details and connect it to wordpress. Before you can connect it, you have to create MySQL database first. Here is how you do it.

How to create MySQL database for wordpress installation

Even though if you have installed wordpress using automation tool, knowing how to create MySQL database manually is a knowledge which will help you later. Creating MySQL database is very simple and you know what most of the hosting companies provide cPanel control panel which makes the process easy. If you are using other than cPanel then the process of creating MySQL database is same, only the interface will change. Here are the steps to create MySQL database using cPanel.

Related: What is cPanel control panel – How it works

Creating MySQL database for wordpress using cPanel

Step 1: Login to your website control panel using the username and password provided by your hosting company. (For example: yourdomainname.com/cpanel)

Step 2: Next find and open MySQL database in databases section. Now a page opens for MySQL database.

Creating MySQL database using cPanel - wordpress installation

Step 3: At first you will see a field called create new database. Just enter any name that will be easy for you to recognize later, click on create database.

How to create MySQL database for wordpress using cPanel, database wizard

Step 4: Now you will see a message that says, Added the database “your database_name”. Note the database name and hit back. This will take you to page where you have created your database.

Setting up MySQL database for wordpress installation - cPanel and phpMyAdmin

Step 5: Next step is to assign users to database. Just scroll down to “Add new user” area and then enter your username and password. Make sure that the password you provided is hard enough to break. Towards the right side of the strength indicator you will see password generator. Instead of entering password by your own, you can generate password with a combination of uppercase, lowercase, symbols, numbers which makes the password strong.

How to create MySQL database for wordpress installation, cPanel database

Step 6: When done click on create user which will take you to the confirmation screen that says “added new user with the password”. Just copy the user name and password in a text editor which you will need it during wordpress installation.

Step 7: Now go back and add user to database. Choose the username, select the database name and click on add.  Now you will see MySQL account maintenance page where you have to assign user privileges.

Create MySQL database for wordpress using cPanel, phpMyAdmin

Step 8: Administrator needs all rights and since you are the administrator check all privileges and make changes. Next you will see a message that says “username was added to the database”. That’s it.

Setting up MySQL database using MySQL database wizard

In Databases area you will see MySQL database wizard that will easily guide you to the process of creating MySQL database.

So you are all done and you have all the details such as database name, database username and database password. When running the installation script you will be asked to enter database name, user, password which will connect wordpress to database and all that goes in to your wp-config.php file.

How to create MySQL database for wordpress - installing wordpress

Related: What is wp-config.php? Where and how to edit wp-config.php

Creating MySQL database using phpMyAdmin

You can also create MySQL database using phpMyAdmin, a web based graphical interface used to manage database.  In cPanel you will have phpMyAdmin, but in there you don’t have the option to create MySQL database. Because creating database in phpMyAdmin will prevents cPanel from managing it.  So this process will be useful for you when installing wordpress on localhost.

how to create MySQL database using phpMyAdmin for wordpress install

Useful related topics

Hope you have learned how to create MySQL database for wordpress installation using cPanel and phpMyAdmin. If you have any question regarding MySQL database then please notify us using comments below.