MySQL Create Database

You can create a MySQL database by using MySQL Command Line Client.

Open the MySQL console and write down password, if you set one while installation. You will get the following:

mysql create database

Now you are ready to create database.

Syntax:

snippet
CREATE DATABASE database_name;

Example:

Let's take an example to create a database name "employees"

snippet
CREATE DATABASE employees;

It will look like this:

mysql create database

You can check the created database by the following query:

snippet
SHOW DATABASES;

Output

mysql create database

Here, you can see the all created databases.

Note
Note: All the database names, table names and table fields name are case sensitive. You must have to use proper names while giving any SQL command.
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents +