Wednesday, January 7, 2015

Import large sql file in XAMPP





There is a limitation to import a sql file in PHPMyAdmin, default around 2 MB. You can increase the limit by changing php.ini. But it still depends on memory limit.
For example, I have MySQL dump file around 100 MB.To import this huge file to database, first go to mysql.exe installation directory in command prompt (assuming xampp installed in C:\xampp_php5.4) :
cd  C:\xampp_php5.4\mysql\bin\
mysql -u root 
type following commands assuming tracs.sql is in C:/tracs.sql
mysql> create database tracs;
mysql> use tracs;
mysql> source C:/tracs.sql;

No comments:

Post a Comment