MySQL: Enable LOAD DATA LOCAL INFILE

后端 未结 18 1353
北海茫月
北海茫月 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条回答
  •  温柔的废话
    2020-11-22 09:35

    The my.cnf file you should edit is the /etc/mysql/my.cnf file. Just:

    sudo nano /etc/mysql/my.cnf
    

    Then add:

    [mysqld]
    local-infile 
    
    [mysql]
    local-infile 
    

    The headers [mysqld] and [mysql] are already given, just locate them in the file and add local-infile underneath each of them.

    It works for me on MySQL 5.5 on Ubuntu 12.04 LTS.

提交回复
热议问题