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.
Step 2:- Enter a desired name for the database in New Database field and click on the Create Database button as shown below:
step3:- A confirmation screen will be displayed, informing that the database has been successfully created:
Step 4:- Now it’s time to create a new database user, enter a database username and password in their respective fields.
Step 5:- Now add this user to the database providing full privilege to access this database.
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:
Its all done, Congrats!!!! Now you can access your database through phpmyadmin.