

You MUST have compiled PHP using the full path to MySQL, otherwise it will use it's internal handlers, which don't work with the "new" LOAD DATA. You MUST have a compiled MySQL with '-enable-local-infile ' LOAD DATA INFILE '/full_path_to_file/your_file.txt' INTO TABLE your_table Let me elaborate what took forever to find out.(*NIX) The IRS manual makes more sense than the docs for "LOAD DATA " I lost 4 hours and 1 client because a simple DB import via PHP that used to work no longer does. The lack of usable examples for overcoming this "security improvement"is INEXCUSABLE! Especially given how widely this function is used. Recompiling PHP with "-with-mysql=/usr" solved the problem instantly, because it links against the original MySQL libraries with local file handling enabled.

If you followed one of the many documents which tell you to compile PHP with "-with-mysql", you didn't link against the MySQL libraries, but you're using the internal MySQL client of PHP, which seems to cause trouble, even if the MySQL server is correctly built with "-enable-local-infile". This topic often leads to problems in combination with PHP. Monitor whenever a server is started with the

Security advisors notify subscribers to the MySQL Enterprise LOCAL is disabled, either in the server or theĬlient, a client that attempts to issue such a statementĮRROR 1148: The used command is not allowed with this MySQL version However, to keep this from causing problems for Local load operation requires that the server is enabled toĭATA LOCAL in Perl scripts or other programs that Mysqlimport, local data file loading is off LOCAL commands from the server side by startingįor the mysql command-line client, enable LOCAL cannot be used by any client unless it is If you build MySQL from source but do not invoke By default, all MySQL clients and libraries in binaryĬompatible with MySQL 3.23.48 and before.
