raunak-gupta
10/11/2016 - 6:54 AM

Import an SQL file using the command line in MySQL

Import an SQL file using the command line in MySQL

MySQL command line

Copy the SQL fiel into C:\xampp\mysql\bin path
then run mysql using command

C:\xampp\mysql\bin> mysql -u root -p

mysql> use db_name;
mysql> source backup-file.sql;