4
$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[42000]: 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.

1
  • I'm voting to close this question as off-topic because this is not about Magento
    – Marius
    Jun 18, 2016 at 10:36

0

Browse other questions tagged or ask your own question.