Home > OS >  MYSQL Error Code: 1290 - The MySQL server is running with the --secure-file-priv option so it cannot
MYSQL Error Code: 1290 - The MySQL server is running with the --secure-file-priv option so it cannot

Time:12-29

I'm following the instructions in this video to try and build a retrosheet SQL database, and I'm having issues executing the SQL script to do a bulk insert into the database.

I was previously able to do this with MYSQL 5.7, but recently upgrade to 8.0 and I'm now getting stuck at this step. I've tried following the advice in the video to comment out the --secure-file-priv option in the my.ini file, and I've also tried setting it to the directory location of the data I want to import, but in both situations I'm still getting the error message "Error Code: 1290 - The MySQL server is running with the --secure-file-priv option so it cannot execute this statement."

I've also run this SHOW VARIABLES LIKE 'secure_file_priv'; command in SQLYOG to verify that the secure_file_priv option has been updated.

Has anything changed between mysql versions that this method no long works to turn of the --secure-file-priv option?

Video I'm watching for reference: enter image description here

Then I created a test table.

create table test (
id int );

Used the load data command

LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/test.txt' INTO TABLE test
LINES TERMINATED BY '\r\n'; 

And everything works fine.

select * from test;

enter image description here

  • Related