Enabling or Disabling LOCAL Capability for LOAD DATA
If LOCAL is disabled on the server side, clients cannot use this capability at all. If LOCAL is enabled on the server side, the client library might still have LOCAL disabled by default on the client side, but certain programs may allow it to be enabled on demand. For example, mysql has a --local-infile option to allow LOCAL, and mysqlimport has a --local option.
For programs that have no explicit option for enabling or disabling LOCAL, you might still be able to control this capability if the program reads option files implicitly. This depends on whether the program invokes the mysql_options() C API function with the MYSQL_READ_DEFAULT_FILE or MYSQL_READ_DEFAULT_GROUP option that causes option files to be read when the connection to the server is made. If the program does use mysql_options() in this way, you can list a local-infile or disable-local-infile option in an appropriate option file to enable or disable LOCAL. The mysql_options() function is described in Appendix G, "C API Reference."
Programming interfaces for MySQL in other languages also may be able to control LOCAL this way if they are based on the C API and invoke mysql_options(). For example, in a Perl DBI script, you can use the mysql_read_default_file and mysql_read_default_group options in the data source name string that controls how the script connects to the MySQL server.