We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

LOAD DATA LOCAL INFILE forbidden | Forum

Cesare
Cesare Jan 23 '15
Hello,
I'm working on an importer, to perform bulk upload I use csv files. To speedup the elaboration I would like to upload them into an import table and perform the update directly in sql.

I'm using the LOAD DATA LOCAL INFILE provided by mysql but I'm receiving "LOAD DATA LOCAL INFILE forbidden" error.
Apparently it's a configuration of the PDO
PDO::MYSQL_ATTR_LOCAL_INFILE => true
Unfortunatly it need to be set as a option when the driver is created, so directly in OW_Database

$this->connection = new PDO($dsn, $params['username'], $params['password'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES UTF8',
                PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true,PDO::MYSQL_ATTR_LOCAL_INFILE => true));

Is it possible have it in the new releases ? is there any workaraound I could use ?

Thanks you :)