I am using MySQL LOAD DATA LOCAL INFILE command and I get this error:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1148 The
Just follow the following process to solve the problem:
Login to mysql using command line.
mysql -u root -p
Check the local infile status:
SHOW VARIABLES LIKE 'local_infile';
If the output is Off, run this command:
SET GLOBAL local_infile = 1;
Check the status again:
SHOW VARIABLES LIKE 'local_infile';
The output will be: see now
Finally restart mysql:
service mysql restart