Search code examples
mysqlsymfonydoctrine-ormload-data-infile

An exception occurred while executing 'LOAD DATA LOCAL INFILE


I have all previleges to the mysql user for the database but still getting below error

[Doctrine\DBAL\DBALException]
An exception occurred while executing 'LOAD DATA LOCAL INFILE '/tmp/uk_insiders/tfo.uktrades_transaction_code.out' IGNORE INTO TABLE uktrades_transaction_codes FIELDS TERMINATED BY '|' (id,description)':

Warning: PDOStatement::execute(): LOAD DATA LOCAL INFILE forbidden in /Symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 138

[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: PDOStatement::execute(): LOAD DATA LOCAL INFILE forbidden in /Symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Statement.php line 138


Solution

  • Got the same exception message. I was able to perform this by using PDO dirtectly.