Ubuntu server 16.04 - mysql, The MySQL server is running with the --secure-file-priv option

0

I need help, I'm setting up a servidor web with ubuntu server 16.04 , apache , mysql and php , and I'm trying to import data from a text file to mysql and I get the following message:

  

The MySQL server is running with the - secure-file-priv option so it can not execute this statement: LOAD DATA INFILE, please help me with this problem

    
asked by jean pool 30.07.2016 в 06:04
source

1 answer

1

You have two options:

  • Move the file to the directory specified by secure-file-priv
  • Disable secure-file-priv This will be done by modifying the value in the my.cnf file of your server. Then do a mysql restart.
  • The location of the mysqld.cnf I think is valid for Ubunut Xenial, but other distros may vary as /etc/my.cnf

    sudo EDITOR /etc/mysql/mysql.conf.d/mysqld.cnf
    secure-file-priv = ""  
    

    Mysql :: 6.1.4 Server System Variables :: sysvar secure file

        
    answered by 01.08.2016 в 13:04