5/26/2017 - 2:24 PM

Create database and user

Create database and user

Step 1: Login to MySQL ( you will need an account )

mysql -u mysql_user -p

Step 2: Create the Database

create database db_name;

Step 3: Verify that it’s there

mysql > show databases;

Step 4: Create the User

mysql > create user db_user;

Step 5: Grant privileges while assigning the password

mysql > grant all on db_name.* to 'db_user'@'localhost' identified by 'db_password';