MySQL Forums
Forum List  »  Newbie

How do I disable or work around the mysql-secure-priv option in Windows with MySQL Community Edition?
Posted by: Montana Burr
Date: January 05, 2022 03:33PM

I have MySQL Community Edition v8 running on my laptop, and I would like to load a CSV file into it. However, I can't, because --secure-file-priv is enabled.

Apparently, I'm supposed to be able to load a data file from C:\Program Files\MySQL Server 8.0\Uploads, and I tried:

LOAD DATA INFILE "C:\Program Files\MySQL\MySQL Server 8.0\Uploads"
INTO TABLE theStates FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
IGNORE 1 LINES (stateId,
stateName,
statePopulation,
Growth,
Pop2018,
Pop2010,
growthSince2010,
Percent,
Density
);

However, this gave me the same error message.

What should I do, and how do I do that?

I should note that I apparently have NO my.ini file.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.