LOAD DATA LOCAL INFILE
is not enabled by default. Normally, it should be enabled by placing local-infile=1
in my.cnf
. But it does not work for all installations. In my experience, it worked for Debian 7, but not Debian 7 minimal, though both installations come from the same precompiled deb package. Both on OpenVZ VPS.
How to debug why local-infile=1
does not work for an installation, and how to safely activate LOAD DATA LOCAL INFILE
?
Best Answer
If the MySQL Debian-7 minimal cannot use
local_infile
, look around all the make files used for compiling to see if it is disabled by default or iflocal_infile
is enabled for the Debian-7.Before taking that kind of time, please run the following:
It should echo the following:
If it still says
'OFF'
, then look deep within the compiler settings to enable it.If it sets to
'ON'
, you are OK.Please note I did not say
I said use
The option local_infile is Boolean, not numeric.
If setting this in
my.cnf
and restarting mysql does not work either, you will have to start up mysql with something like this:
or perhaps adding this to
my.cnf
then restart mysql.
Give it a Try !!!