MySQL : How to Import an SQL file in Windows via Command line

43

In this article, we will discuss – How to Import an SQL file in Windows via Command line only few steps to import SQL file. which is given below.

Step 1: Open Shell Terminal(Go to xampp and click to shell tab).

Step 2: Login to MySQL Using below Command.


mysql -u root -p

Step 3:  Create  database name.


create database databaseName;

After creating database import SQL file. This is last step to import sql or mysql file

See below example:

Step 4: 


databaseName < file.sql

Successfully Uploaded Database.

LEAVE A REPLY

Please enter your comment!
Please enter your name here