I'm importing .CSV files into mySQL using LOAD DATA LOCAL INFILE, and it's working for all my test files (which are relativity small).
The problem occurs when I try using the real file I want to work with, which is 97MB in size. Is there a limit to the file size I can upload? If there is, how can I overcome it? My code for the query is below:
// Import csv data in table in respective rows.
$sql = "LOAD DATA LOCAL INFILE '$csvFileForLoad' INTO TABLE $tableName
FIELDS TERMINATED BY '~'
LINES TERMINATED BY '\\r\\n'
IGNORE 1 LINES
(@ignore, name, age, gender)";
// Execute query
if (mysqli_query($con,$sql)) {
echo "Table populated successfully.\n";
} else {
echo "Error populating table: " . mysqli_error($con) . ".\n";
}
Thanks!