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.