0

I am trying to use the LOAD DATA INFILE query, but it is giving me an error, Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement. I didn't have my.cnf file, so I created one and added

[mysqld]
secure_file_priv = ""

I tried to put it in many locations like, /etc/my.cnf, /etc/mysql/my.cnf, /usr/local/mysql/etc/my.cnf, ~/.my.cnf., /usr/local/mysql/support-files/, but it didn't work. I also tried changing the configuration file path in workbench accordingly, https://stackoverflow.com/a/45292376/14355835. How can I make MySQL locate my my.cnf file? I'm using macOS Monterey in case it helps.

9ganzi
  • 181
  • 10
  • `--defaults-file=...` option in daemon starting command line. *I tried to put it in many locations* https://dev.mysql.com/doc/refman/8.0/en/option-files.html – Akina Mar 23 '22 at 20:29
  • Does this answer your question? [How should I tackle --secure-file-priv in MySQL?](https://stackoverflow.com/questions/32737478/how-should-i-tackle-secure-file-priv-in-mysql) – michal Mar 23 '22 at 20:31
  • @michal no, I have tried the solutions from here too – 9ganzi Mar 23 '22 at 21:06

0 Answers0