MYSQL 'local_infile' keep 'on' after restart

rwzdoorn

Verified User
Joined
Jun 2, 2015
Messages
18
Hi,

I'm exploring the world of affiliate linking and want to auto load .csv files from several feeds into my database. I've read about local_infile,which I can turn on, but goes off after restarting MYSQL.

How can I keep local_infile turned 'on' always? (and yes, I am aware of the security issues related to loading files).

I tried the following:
- Login with root mysql u/p , SET GLOBAL local_infile = true; / SET GLOBAL local_infile = 1; SET GLOBAL local_infile = On;
- Changed and saved /etc/my.cnf , added local-infile=ON under [mysqld]
- Changed and saved /usr/local/php74/lib/php.ini , removed ; sign and kept mysqli.allow_local_infile = 1

What am I doing wrong?
 
local_infile is pretty dangerous, thus it's disabled by default on DA boxes. I'd suggest chattr'ing the file (+i) to make the change permanent.
 
Hi,

Thanks for suggesting the chattr (+i) option. The strange thing is, when I apply the changes in the files but when restarting mySQL it stops working.The files keep the settings saved but won't apply again. How can I run it when rebooting MySQL?
 
Back
Top