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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.