Error code 1290 - secure-file-priv not working
Hi! I'm new to MySQL and have an issue. I'm running MySQL 8.4 on Windows 11. Having trouble with secure-file-priv.
Here's my CREATE stmt
CREATE TABLE addrs (
ID int not null AUTO_INCREMENT,
Unit int not null,
ShortStreetNm varchar(3) not null,
LongStreetNm varchar(50) not null,
BldgCondo varchar(3) not null,
Model varchar(1) not null,
YearBuilt varchar(4)not null,
ForSale varchar(3) not null,
SanilMail varchar(3) not null,
Absentee varchar(3)not null,
MailboxStnd int not null,
MailboxPst int not null,
Rental varchar(3) not null,
RentalNote varchar(250) not null,
Termites varchar(4) not null,
RoofRepl int not null,
Rhinoshield date not null,
GuttersRepl date not null,
GutterNote1 varchar(250) not null,
GutterNote2 varchar(250) not null,
ChimneySeal date,
ChimneyCap date,
ChimneyNote varchar(250) not null,
PRIMARY KEY (ID),
UNIQUE KEY `id_Unit` (`Unit`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
That works fine.
Here's the LOAD stmt:
LOAD DATA INFILE 'C:\mySQL\Uploads\Import Addresses to mySQL.csv'
INTO TABLE addrs
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
This returns Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it can not execute this statement.
The output of SHOW VARIABLES LIKE 'secure_file_priv'; is "C:\mySQL"
Even if I set secure-file-priv to the default location it fails. I've also tried setting to "". That fails.
The secure-file-priv setting is below the [mysqld] header.
The NETWORK SERVICE account has full access to "C:\mySQL".
Logged in to workbench as root. the root account has the FILE permission.
I have tried uninstalling 8.4 and workbench and the installing them again. No change in behavior. FWIW, I'm also running MySQL on a MacBook Pro M3 without any issues.
Two questions.
1 whe does SHOW VARIABLES use secure_file_priv (note the underscores) but the .ini file uses hypens?
2 what am I doing wrong. I know it's probably something simple.
Any assistance would be greatly appreciated!