Create Database In MySQL

How to create a database in MySQL?

Explanation

Before going to create database in mysql check whether there is any database with the name you are going to create. Check this by the following SHOW statement:
mysql>Show database in MySQL :
This query will list the available databases. Please note that MySQL is case insensitive. So you can give the query with different cases also. So show dataBASES; , SHOW dataBASES; will also work.
Once you have confirmed that you don't have a database with the name you intended to create, then you can create your own database by,
mysql> create database sample;
Please note that only in Unix the database name is case sensitive. The above query will create an empty database and it wouldn't contain any tables.

Ask Questions

Ask Question