How to create MySQL database?

Login to your MySQL database server

mysql -u root -p

and type this command:

mysql> create database test_db;
Query OK, 1 row affected (0.00 sec)

To check your newly created database, type this command:

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema | 
| mysql              | 
| test               | 
| test_db            | 
+--------------------+
4 rows in set (0.00 sec)