Skip to main content
improved formatting
Source Link
John K. N.
  • 18.3k
  • 14
  • 54
  • 115

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv'
INTO TABLE trial
FIELDS TERMINATED BY ',';

When I run above commands, I got

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

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

I tried many methods to solve the problem. Finally, I changed the '\' characters in the file path to '/' characters.

I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv'
INTO TABLE trial
FIELDS TERMINATED BY ',';

When I run above commands, I got

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

I tried many methods to solve the problem. Finally, I changed the '\' characters in the file path to '/' characters.

I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv'
INTO TABLE trial
FIELDS TERMINATED BY ',';

When I run above commands, I got

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

I tried many methods to solve the problem. Finally, I changed the '\' characters in the file path to '/' characters.

I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv' INTO TABLE trial FIELDS TERMINATED BY ',';

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv'
INTO TABLE trial
FIELDS TERMINATED BY ',';

When I run above commands, I got

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

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

I tried many methods to solve the problem. Finally, I changed the '"'\' characters in the file path to '//' characters. 

I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csvC:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-privsecure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads""C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv' INTO TABLE trial FIELDS TERMINATED BY ',';

When I run above commands, I got

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

I tried many methods to solve the problem. Finally, I changed the '" characters in the file path to '/' characters. I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv'
INTO TABLE trial
FIELDS TERMINATED BY ',';

When I run above commands, I got

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

I tried many methods to solve the problem. Finally, I changed the '\' characters in the file path to '/' characters. 

I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.

Source Link
Mehmet
  • 51
  • 1
  • 2

I am using MySQL Server 8.0 on Windows 10. I tried to load data from csv file using the following commands:

LOAD DATA INFILE 'C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\World_cup_dataset.csv' INTO TABLE trial FIELDS TERMINATED BY ',';

When I run above commands, I got

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

I tried many methods to solve the problem. Finally, I changed the '" characters in the file path to '/' characters. I mean my new file path became C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/World_cup_dataset.csv and my problem were fixed. If you look at my.ini file located in the MySQL Server folder, the path of secure-file-priv is "C:/ProgramData/MySQL/MySQL Server 8.0/Uploads". So, this solution makes sense.