How to CREATE database in MYSQL using Terminal in UBUNTU?

To Create database from local file by using terminal:-

At first open terminal (CTRL + ALT + T) and then type this following code:-

mysql -u user_name  -ppass_word

Example:-

Here:-
Username = admin
Password = admin37
New database = new_db
Database want to import = demo_db.sql

as this format:-

mysql -u user_name(username of database) -ppassword(Database password)

 mysql -u admin  -padmin37

Then PRESS ENTER key and type this following code:-

create database new_db;

To see the created database use this code:-

show databases;
Total Page Visits: 11834 - Today Page Visits: 1

Leave a Reply