In one of the project we had to import some .csv files into Mysql database. Files were of size 80mb and more. When we tried to upload the files through phpmyadmin it was resulting in timeout error – Maximum execution time of 360 seconds exceeded (see image below):
A better solution is to import such files via command prompt.
1. Open the command prompt.
2. Type >mysql -u username -p.
3. Type password ********** it will take you to mysql prompt.
4. open database in which you want to upload the file using the following command:
5. Import data with the command like this:
load data local infile 'filename.csv' into table table fields terminated by ',' enclosed by '"' lines terminated by 'n' (column1,column2,..... );