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 1

Now you are ready to create database.

Syntax:

  1. CREATE DATABASE database_name;

Example:

Let’s take an example to create a database name “employees”

  1. CREATE DATABASE employees;

It will look like this:

mysql create database 2

You can check the created database by the following query:

  1. SHOW DATABASES;

Output

mysql create database 3

Here, you can see the all created databases.

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *