How to create MySQL database for WordPress

Before you install a WordPress site on you localhost or on server, you need to create a MySQL database for WordPress Installation and user for WordPress.

Creating a database is  very important phase for development of a site. In this tutorial  I am going to explain briefly how to create a Database and a Database User.

How to create MySQL database for WordPress

In order to create MySQL database for WordPress on your hosting account, you need to log in to cPanel.
There are two ways to log in cPanel.

  • http://yourdomainname.com/cpanel
  • http://cpanel.servername.com

After successfull login to your cPanel there are 6 steps to go ahead.

Step 1:-  For creating a new database click on the MySql Databases.
create MySQL database and user in WordPress
Step 2:- Enter a desired name for the database in New Database field and click on the Create Database button as shown below:

create MySQL database for WordPress
step3:- A confirmation screen will be displayed, informing that the database has been successfully created:

create user in MySQL for WordPress
Step 4:- Now it’s time to create a new database user, enter a database username and password in their respective fields.

create username and password in MySQL for WordPress
Step 5:-  Now add this user to the database providing full privilege to access this database.
add user to Mysql Database in WordPress
Step 6:-  Now you will be redirected to a screen where you’ll be prompted to choose the desired privileges. It is advisable to select All Privileges and click on the Make Changes button:

create MySQL database for WordPress
Its all done, Congrats!!!! Now you can access your database through phpmyadmin.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.