In MySQL database server CREATE DATABASE statement is used to new database. Login to MySQL server with root access.

Syntax :-

CREATE DATABASE database_name;

Example :-

Login to your MySQL server using command line. You will get MySQL database prompt like mysql> . Now use CREATE DATABASE statement to create database.

mysql> CREATE DATABASE mydb;

To confirm that database is created properly use show databases command from database command prompt to list all databases.

mysql> show databases;

| Database           |
| information_schema |
| mysql              |
| mydb               |
| performance_schema |
4 rows in set (0.03 sec)