0

Currently I am trying to import 1.3 GB CSV into MySQL via phpMyAdmin.

Problem: Having difficultly splitting the file and then importing it,after splitting using a windows program some of the columns become corrupted.

Question: Is it possible to upload the entire thing into phpMyAdmin without having to split it?

Information I have 5 columns in phpMyAdmin, and so does the CSV so columns match up.

vijay
  • 731
  • 5
  • 15
Jonah Hart
  • 35
  • 5

1 Answers1

0

Probably this type of issue is face by other user also.

According to his answer, you can use.

mysql -u root -p

set global net_buffer_length=1000000; --Set network buffer length to a large byte number

set global max_allowed_packet=1000000000; --Set maximum allowed packet size to a large byte number

SET foreign_key_checks = 0; --Disable foreign key checking to avoid delays,errors and unwanted behaviour

source file.sql --Import your sql dump file

SET foreign_key_checks = 1; --Remember to enable foreign key checks when procedure is complete!

Also check out another method

mysql -u username -p -h hostname databasename < dump.sql
Community
  • 1
  • 1
vijay
  • 731
  • 5
  • 15