MySQL: Enable LOAD DATA LOCAL INFILE

后端 未结 18 1011
北海茫月
北海茫月 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:54

    Ok, something odd is happening here. To make this work, do NOT need to make any configuration changes in /etc/mysql/my.cnf . All you need to do is to restart the current mysql service in terminal:

    sudo service mysql restart
    

    Then if I want to "recreate" the bug, I simply restart the apache service:

    sudo service apache2 restart
    

    Which can then be fixed again by entering the following command:

    sudo service mysql restart
    

    So, it appears that the apache2 is doing something to not allow this feature when it starts up (which is then reversed/corrected if restart the mysql service).

    Valid in Debian based distributions.

    service mysqld restart
    service httpd restart
    

    Valid in RedHat based distributions

提交回复
热议问题