There many way you can do that . i will give some options here to import large file using command.

Option 1. You can do this using single cmd. In this cmd D is my xampp or wampp install folder so i use this where mysql.exe install and second option database name and last is sql file so replace it as your then run this. This is for xampp .

 
D:\xampp\mysql\bin\mysql.exe -u root -p databse_name < D:\yoursqlfile.sql

This is for wampp

 
D:\wamp64\bin\mysql\mysql5.7.14\bin\mysql.exe -u root -p databse_name< D:\yoursqlfile.sql

just change your folder and mysql version etc

Option 2. Suppose your current path is which is showing command prompt

 
C:\Users\shafiq;

then change directory using cd.. then goto your mysql directory where your xampp installed. Then cd.. for change directory. then go to bin folder.

 
C:\xampp\mysql\bin;
C:\xampp\mysql\bin\mysql -u {username} -p {database password}.

then please enter when you see enter password in command prompt.
choose database using

 
mysql->use test (where database name test)

then put in source sql in bin folder.

then last command will be

 
mysql-> source test.sql (where test.sql is file name which need to import)

then press enter

This is full command

 
C:\Users\shafiq;
C:\xampp\mysql\bin
C:\xampp\mysql\bin\mysql -u {username} -p {database password}
mysql-> use test
mysql->source test.sql
Comment