$write = $resource->getConnection('core_write');
 $query = "LOAD DATA LOCAL INFILE '" . $partCsvPath . "' "
          . "INTO TABLE " . $resource->getTableName('csv')
          . " FIELDS TERMINATED BY ','"
          . " LINES TERMINATED BY '\r'"
          . " (col1, col2, col3, col4, col5, col6)";

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.

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

Browse other questions tagged or ask your own question.