Sqoop ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option

0 votes

I"m trying to load data to mysql from local using the below command

LOAD DATA INFILE "mnt/home/edureka_519340/Basavaraju/Sqoop_Files.county_facts.csv" INTO TABLE county_data_Basavaraju
FIELDS TERMINATED BY "," ENCLOSED BY """
LINES TERMINATED BY "\r\n"
IGNORE 1 LINES;

But getting the following error

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

Please suggest how to load the mentioned csv file data in local path to the mysql table.

Jul 10, 2019 in Big Data Hadoop by Adi
637 views

1 answer to this question.

0 votes

If your dataset is in the FTP then you have to execute the below command to load it in the table,

Syntax: 

load data local infile '<filepath/filename>' into table <table_name> fields terminated by ',' enclosed by '"'  lines terminated by '\n' ignore 1 rows;

So, your command should look like below,

LOAD DATA LOCAL INFILE 'Basavaraju/Sqoop_Files/county_facts.csv' INTO TABLE county_data_Basavaraju
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 LINES; 

If you notice, I have removed the complete path and just mentioned the directory name and the filename. This is because the load data local infile command searches for the file in the local file system only. 

answered Jul 10, 2019 by Kunal

Related Questions In Big Data Hadoop

0 votes
1 answer

ERROR: org.apache.hadoop.hbase.ipc.ServerNotRunningYetException: Server is not running yet!

Hi@akhtar, This error occurs if the hbase server ...READ MORE

answered Mar 30 in Big Data Hadoop by MD
• 41,900 points
399 views
0 votes
1 answer

The file exists before processing with hadoop command

Took session and it got resolved. READ MORE

answered Dec 18, 2017 in Big Data Hadoop by Sudhir
• 1,610 points
163 views
0 votes
1 answer
+1 vote
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
5,499 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,920 points
809 views
+1 vote
11 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyF ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
34,077 views
–1 vote
1 answer

Hadoop dfs -ls command?

In your case there is no difference ...READ MORE

answered Mar 16, 2018 in Big Data Hadoop by kurt_cobain
• 9,310 points
2,071 views
0 votes
11 answers
0 votes
1 answer

What is the command to count number of lines in a file in hdfs?

hadoop fs -cat /example2/doc1 | wc -l READ MORE

answered Nov 22, 2018 in Big Data Hadoop by Omkar
• 69,020 points
920 views