Possible Duplicate:
How to import LARGE sql files into mysql table
Using php i have exported via odbc some table, which have many many lines, and it’s size is about 3GB. Now i need to import that table to my mysql db. But when i try to
mysql -u root -p DB_development < HUGEdb.sql
after some time it’s say : Killed.
Via phpmyadmin interface it’s bad to.
My sql file looks like this:
INSERT INTO `LINK_LA_TYP` VALUES
('1','8917181','1','24','2'),
('1','8934610','1','24','1'),
('1','9403766','1','30','1'),
('1','9422299','1','30','2'),
many many many so far lines
('1','63139389','321','10017','1');
Is it any way of importing such table? (source and bigdump doesn’t help)
You are killing the buffer! even through MyAdmin you have to increase the PHP memory. I have had something like that before try this maybe:
Write a php code,while loop the lines and each time clear the variable (each line of record one variable)
then from PHP.ini change your PHP Exec Time out to MAX
Something like this
PS: I STRONGLY recommend not pushing the buffer, you may over load the server. it’s better to MAX the execute time and keep refreshing garbage collector, than killing your memory.