Skip to content
Advertisement

Why is this MYSQL statement giving me an error?

JavaScript

The file is there. I even pasted the path into the mysql console. The permissions are correct.

In fact, I even tested it on root user and root mysql.

JavaScript

Advertisement

Answer

Note that when you do LOAD DATA INFILE, MySQL is looking for that file on the server – not on your client machine.

If you want to use LOAD DATA INFILE to load a file that is on the client machine (and not the server machine), you must use LOAD DATA LOCAL INFILE.

http://dev.mysql.com/doc/refman/5.1/en/load-data.html

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement