Moved the file to the directory specified by secure_file_priv, but it is still stuck

104 Views Asked by At

When loading a file(filename.csv) into the table, it gets trapped by the ---secure-file-priv option, so I saved the file into the directory C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\ showed by the next command.

show variables like "secure_file_priv";

then,

load data infile 'C:\ProProgramData\MySQL\MySQL Server 8.0\Ploads\losing\filmename.csv' into table tablename;

but it's still stuck with the ---secure-file-priv option. Why is it still stuck?

Error code:

ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement

Translated with www.DeepL.com/Translator (free version)

1

There are 1 best solutions below

0
trgw On

\ is a escape literal. so I needed to type C:\\ProgramData__MySQL\\MySQL...