Jump to content

Need help importing large csv file into phpmyadmin


kabar916

Recommended Posts

Guys!  I need help.  Im getting a error message in phpmyadmin saying my csv file is too large to upload.  The file is 14MB in size.  i can not figure how to import the data into sql through phpmyadmin.  This is on my local computer.  The file has in it about 50,000 rows and about 25 columns.  Please help me!!!  Ive been stuck for a few days now trying to figure it out. 

 

Thank you

Kabar

upload the file to your servers home or root directory then in phpmyadmin use the mysql console

LOAD DATA LOCAL INFILE '/importfile.csv'  // wherever the file is located relative on the server
INTO TABLE test_table 
FIELDS TERMINATED BY ',' 
LINES TERMINATED BY '\n' 
(field1, filed2, field3);

 

This function was created with large files in mind. I uploaded 1.2 million rows in around 4 seconds

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.