Can you enable "local-infile" for MySQL?

The commands for LOAD DATA INFILE/OUTFILE, are not allowed on our servers for security reasons. In order for you to use these functions you must use Load Data please use "LOAD DATA LOCAL"

The difference between the two is that without the LOCAL keyword the command requests the server to find the file and load data from it. With the LOCAL keyword, the mysql client (eg the customer's script, phpmyadmin, or the customer connecting from ssh etc) is what does the loading and then passes the data to mysql. As such, there is no special permissions needed for customers to do a "LOAD DATA LOCAL"

There are some alternatives to this, if you're trying to import or export a databases please use the following

    $ echo "source databasefile.sql" | mysql -u user -p password databasename
    $ mysql -u user -p password databasename > outputfile.sql
Was this answer helpful? 0 Users Found This Useful (0 Votes)