My OS: Mac Big Sur 11.4
MySQL Workbench Version 8.0.28
As I need to import bulk CSV files to MySQL, my goal here is to NOT receive NULL when run:
SHOW VARIABLES LIKE 'secure_file_priv';
I have tried this guide as it seems recent by:
[mysqld] secure_file_priv = ""
/etc/
or /usr/local/mysql-8.0.28-macos11-x86_64/support-files
But I still received NULL in secure-file-priv
Any suggestions on how to fix this problem is appreciated.
After researching, I was able to create my.cnf
with secure_file_priv
+ path , connect Configuration file to my.cnf and import cvs files using LOAD DATA INFILE.
Here's how I did it:
A. CREATING my.cnf:
my.cnf
file using text editor[mysqld] secure_file_priv = "/usr/local/”
*When save, untick for If not extension provided, use “.txt” so your "Kind" of file is Document.
/etc/
B. IN MYSQL WORKBENCH:
/etc/my.cnf
`
SHOW VARIABLES LIKE 'secure_file_priv';
Expected result:
Variable_Name: secure_file_priv
Value: /usr/local/
`
C. IMPORTING:
/usr/local/
LOAD DATA INFILE '/usr/local/filename.csv' [...]