MySQL: Enable LOAD DATA LOCAL INFILE

后端 未结 18 1074
北海茫月
北海茫月 2020-11-22 09:30

I\'m running Mysql 5.5 on Ubuntu 12 LTS. How should I enable LOAD DATA LOCAL INFILE in my.cnf?

I\'ve tried adding local-infile in my config at various places but I\'

18条回答
  •  -上瘾入骨i
    2020-11-22 09:44

    I solved this problem on MySQL 8.0.11 with the mysql terminal command:

    SET GLOBAL local_infile = true;
    

    I mean I logged in first with the usual:

    mysql -u user -p*
    

    After that you can see the status with the command:

    SHOW GLOBAL VARIABLES LIKE 'local_infile';
    

    It should be ON. I will not be writing about security issued with loading local files into database here.

提交回复
热议问题