Create Mysql Database

Now we will learn how to create database. Database names are case sensitive. so we must have to refer our database in lower case "databasename" not "DataBaseName" in linux. This case sensitive concept is also true for tables.

Create Database

When the users create a database, it is stored as a set of files on the hard disk of the computer. To create a user-defined database, you can use the CREATE DATABASE statement.
This command will create one new database with name of "testdb". If database name already exists, you will get following error message
Can't create database 'testdb'; database exists

Use Database

Before we use the database, we must select it for use each time.
USE auxibox
This command will select the existing database to use now.

Drop Database

Using this command we will remove the database from our server.

Comments are closed.