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

203

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.

1 COMMENT

  1. You could certainly see your skills in the work you write. The sector hopes for more passionate writers like you who aren’t afraid to mention how they believe. Always go after your heart. “The most profound joy has more of gravity than of gaiety in it.” by Michel de Montaigne.

LEAVE A REPLY

Please enter your comment!
Please enter your name here