Mysql create database command line

Mysql create database command line

Blog Bustle 11/02/2020

Mysql is free and open source relational database management system(RDBMS). We can create multiple databases into Mysql server.

Mysql create database command line steps

Step 1: go to mysql folder directory.

Step 2: then go to bin directory inside mysql.

Step 3: Connect Mysql server. Enter command mysql -u [username] -p[password]

Step 4: Enter password

Step 5: write query "create database database_name;" and hit enter

mysql create database command line

So these were the steps of mysql create database command line.

If we are going to create database which already exists in mysql server then we will get error so before creating database we should check database exists or not.

combined syntax of mysql create database command line with if database exists

create database if not exists database_name;

You can also check database exists or not by show databases like 'database_name'; query.

Mysql database is used to store data. Tables are created inside database to store data and sql is used to write query in Mysql server.

We use queries to manage database. Database can be created and deleted by sql query.

We can also get a list of all databases and select database by sql query.

Mysql uses Apache web server. Apache http server is free open source web server software.

Multiple users can be added to single database.

We can also give permission to them about what are their tasks.

Other important links

Create database in mysql

Show database in mysql

Delete database in mysql

Select database in mysql

Mysql create database command line searches:

Tags: #mysql