$write = $resource->getConnection('core_write'); $write->beginTransaction(); $query = "LOAD DATA LOCAL INFILE '" . $partCsvPath . "' " . "INTO TABLE " . $resource->getTableName('csv') . " FIELDS TERMINATED BY ','" . " LINES TERMINATED BY '\r'" . " (col1, col2, col3, col4, col5, col6)"; $write->exec($query); $write->commit();
This gives me the following error:
SQLSTATE: Syntax error or access violation: 1148 The used command is not allowed with this MySQL version
I can execute this query in MySQL just fine but not through Magento.
Is there any solution to this? without
local this gives me permission denied error.