0

I am trying to load data in MySQL using the following command in Windows 10:

LOAD DATA INFILE 'D:/OneDrive/Documents/A/code/samsql/customer.csv'
INTO TABLE customers
FIELDS TERMINATED BY ','
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;

I got the error

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

I opened the my.ini file in the folder "C:\ProgramData\MySQL\MySQL Server 8.0" And I changed the secure-file-priv to

secure-file-priv="D:/"

But still I got the same error. Then based on some of the other threads I tried

secure-file-priv=""

But still I get the same error. When I do

SHOW VARIABLES LIKE "secure_file_priv";

It returns

sevure_file_priv NULL

But still the error 1290 is there, and I cannot load the data. How do I resolve this?

Shadow
  • 33,525
  • 10
  • 51
  • 64
Alhpa Delta
  • 3,385
  • 4
  • 16
  • 31

0 Answers0