How to create database on computer

saya menulis ini untuk kawan2 yang coba menginstall wordpress dan joomla atau sejenisnya di computernya , jadi sebelum penginstalan , terlebih dahulu di perlukan database nya , so how to create user and database .. okeh follow me

Open your terminal

Go ahead and log into the MySQL Shell:

mysql -u root -p

Login using your MySQL root password, and then we need to create a wordpress database, a user in that database, and give that user a new password. Keep in mind that all MySQL commands must end with semi-colon.

First, let’s create the  the database name

CREATE DATABASE alfianwordpress;
Query OK, 1 row affected (0.00 sec)

Then we need to create the new user. You can replace the database, name, and password, with whatever you prefer:

CREATE USER alfianlinux@localhost;
Query OK, 0 rows affected (0.00 sec)

Set the password for your new user: (for example password is idontknow)

SET PASSWORD FOR alfianlinux@localhost= PASSWORD("idontknow");
Query OK, 0 rows affected (0.00 sec)

Finish up by granting all privileges to the new user. Without this command, the wordpress installer will not be able to start up:

GRANT ALL PRIVILEGES ON alfianwordpress.* TO alfianlinux@localhost IDENTIFIED BY 'idontknow';
Query OK, 0 rows affected (0.00 sec)

Then refresh MySQL:

FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

Exit out of the MySQL

exit
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s