Load CSV file data inot MySQL

0 votes

Hello,

I am trying to load csv file data into MySQL table using 

LOAD DATA INFILE "filename" INTO TABLE "tablename" FIELDS TERMINATED BY "," LINES TERMINATED BY "\n" IGNORE 1 ROWS 

in MySQL prompt but getting error 1290 saying that they MySQL server is running with the --secure-file-priv option so it cannot execute this statement.
 

Jul 25 in Apache Spark by Jishan
20 views

1 answer to this question.

0 votes

If you are trying to load file from your system, you have to mention the keyword "local". Try this:

load data local infile "filename" INTO TABLE "tablename" FIELDS TERMINATED BY "," LINES TERMINATED BY "\n" IGNORE 1 ROWS
answered Jul 25 by Sita

Related Questions In Apache Spark

0 votes
0 answers

Load data to mysql from local

I'm trying to load data to mysql ...READ MORE

Jul 23 in Apache Spark by Yogi
18 views
0 votes
1 answer

Scala: CSV file to Save data into HBase

Check the reference code mentioned below: def main(args: ...READ MORE

answered Jul 25 in Apache Spark by Hari
18 views
0 votes
1 answer

Spark: Saving file csv

 If you need a single output file ...READ MORE

answered May 22 in Apache Spark by Rishi
30 views
0 votes
1 answer
0 votes
1 answer
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,490 points
2,303 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,490 points
234 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
11,891 views
0 votes
1 answer

How to load data of .csv file in MySQL Database Table?

You can do it using a code ...READ MORE

answered Jul 22 in Apache Spark by Vishwa
27 views
0 votes
1 answer

Spark, Scala: Load custom delimited file

You can load a DAT file into ...READ MORE

answered Jul 16 in Apache Spark by Shri
51 views