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:
- Creating my.cnf in text editor
- Inputing in my.cnf:
[mysqld] secure_file_priv = ""
- Saving my.cnf in either
/etc/or/usr/local/mysql-8.0.28-macos11-x86_64/support-files - Restarting MySQL
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.cnfwithsecure_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.cnffile 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`
`
C. IMPORTING:
/usr/local/LOAD DATA INFILE '/usr/local/filename.csv' [...]