pdf icons

Creating The MySQL Database And User For Your WordPress Installation

The install process of WordPress creates a set of MySQL tables and populates some of them with appropriate (default) data.

It’s best to create a separate database named wordpress under MySQL so that WordPress has its own reserved data storage area under MySQL into which it will place its tables and populate them with default data appropriately if so desired.

Additionally, create a MySQL user named WordPress. Protect this user with a password and finally grant this user with full rights to the resources held in the WordPress database.

Creating A Database Under MySQL

Open a Command Window:

Start –> Run –> cmd as shown in diagram 1 and diagram 2

StartDiagram 1

Command WindowDiagram 2

At the system prompt Login to MySQL with login id and password created at the time of installing MySQL as shown in diagram 3 and diagram 4.

NOTE: I have covered the installation of MySQL in the MySQL section.

System Prompt Login to MySQLDiagram 3

Successfully Login to MySQLDiagram 4

At the mysql> prompt enter:
mysql> CREATE DATABASE wordpress;

Query OK, 1 row affected (0.00 sec)

Created DB In MySQLDiagram 5

MySQL responds by immediately creating the wordpress database.

Creating The WordPress User Under MySQL

Next create the user wordpress and grant this user all rights on the wordpress database controlled by a password. This information (username, password and database name) will be required at the time of installing WordPress. Write them down and store them safely for future use.

At the mysql> prompt enter:
mysql> GRANT ALL ON wordpress.* TO wordpress@localhost IDENTIFIED BY {use any password here greater than 8 characters}‘;

NOTE: Do not forget the single quotes that surround the password value.

NOTE: Upper and lower case are not important. Use all lowercase if you wish. Uppercase has been used to add some clarity to the MySQL command.

Query OK, 0 row affected (0.03 sec)

Created User In MySQLDiagram 6

This will create a user wordpress, who can login to MySQL only from the local machine and will be identified by the password {password set above}.

Once complete an empty wordpress database is ready for use. This only is accessed by a registered MySQL user named wordpress, who has all rights on the wordpress database.

Since these steps are complete all that is left is to run the WordPress installation PHP scripts within the WordPress core downloaded earlier.

The next tutorial steps you through what you need to do on your local computer just prior actually going through with installing WordPress on your local computer.

Do take a look.

May 5, 2016
Design by Ivan Bayross and Meher Bala © 2017 All Rights Reserved