0

When I try to use LOAD DATA INFILE, I got the following error: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement. Which means I need to change the secure-file-priv value from NULL to empty. How can I change this secure-file-priv value? Where is it located?

There is a post related MySQL ERROR 1290 (HY000) --secure-file-priv option, however it does not answer my problem. I want to change secure_file_priv value on mac osX and that post just tells how to do it in CentOS and Windows. I have checked and there is no 'my.cnf' file in Mac osX.

Community
  • 1
  • 1
Justin
  • 1
  • 2
  • In http://stackoverflow.com/questions/34102562/mysql-error-1290-hy000-secure-file-priv-option there is answer for CentOS and Windows on how to change secure-file-priv value, but there is not answer for Mac osX. – Justin Nov 02 '16 at 21:42
  • `my.cnf` isn't created by default homebrew installed mysql. Use `mysql --help` to see where it checks config file. It should say something about `Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf`. If none of them exist, just create one. – halfelf Nov 03 '16 at 04:10
  • Thanks for the answer. Simply create a 'my.cnf' file and adding a 'secure-file-priv = ""' will make MySQL does not work in my Mac. – Justin Nov 03 '16 at 18:54
  • Here's the answer for Mac OSX. MySQL installed via MAMP uses the local file "~/.my.cnf": https://stackoverflow.com/questions/42430330/how-to-deal-with-the-mysql-server-is-running-with-the-secure-file-priv-option/47504821#47504821 – russian_spy Nov 27 '17 at 06:08

0 Answers0