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 in Big Data Hadoop by Adi
105 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 by Kunal

Related Questions In Big Data Hadoop

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
86 views
0 votes
1 answer
0 votes
1 answer

What is the use of sequence file in Hadoop?

Sequence files are binary files containing serialized ...READ MORE

answered Apr 5, 2018 in Big Data Hadoop by Ashish
• 2,630 points
1,708 views
0 votes
1 answer

What is the slaves file configuration in Hadoop?

The main idea behind is the master ...READ MORE

answered Apr 24, 2018 in Big Data Hadoop by Shubham
• 13,310 points
827 views
0 votes
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,730 points
3,382 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,730 points
407 views
0 votes
10 answers

hadoop fs -put command?

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

answered Dec 7, 2018 in Big Data Hadoop by Aditya
16,892 views
0 votes
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,260 points
1,233 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
• 67,660 points
411 views