I have a csv file, a big one, 30 000 rows. I\'ve tried to import it using LOAD file etc.. from the terminal, as I found on google, but it didn\'t work. It was making the imp
I got this problem when trying to import a large file using phpMyAdmin, and am also unable to use the command in the version which I am using. To solve this I used this CSV editor and split the file into smaller files. Worked fine when I imported each chunk separately.
Increase your php's memory limit and script time, that's beacause your executing the mysql instruction through the php server.
Check your php.ini file for this vars:
memory_limit
max_execution_time
But anyway I would do it through the mysql client (terminal), check mysql doc
LOAD DATA LOCAL INFILE '/path/to/your/csv/file/csv_file.csv' INTO TABLE database_name.table_name FIELDS TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY '\n';
Mysql Documentation - Load Data Infile Syntax PHP Documentation - Ini core settings