How to create database In MYSQL

How to create a database in MYSQL. In this MySQL, Tutorial will see how to create a database using MYSQL command prompt and helpful command to create a database in MySQL.

What is MYSQL Database?

When there is a huge volume of data and end-users, MySql Database can be used for various operations like create, select or drop. It can be created using MySql Command-line client.

When you open the MySql Console, it can help you in operations like create, select or drop. During installation, if you have opted for a password, you can use the same for opening the MySql Console.

MYSQL Command to create database

When you want to create any database on the server, you can create using Create Database.
Syntax: –

CREATE DATABASE database_Name;

Example: –
Let’s create a database Student, which has complete details of Students.

CREATE DATABASE student;

With this query, you can successfully create the database, and if you want to check the database you can use this query.

SHOW DATABASES;

When you will use this query, you can see the list of created databases, in the server.

SELECT Database

When there are multiple databases available in the server, and to save time you directly want to jump to the required database, you can use SELECT command.
Syntax: – USE database_name;

Example: –

USE student;

When you will use this query you can directly open the Student database on your screen.