Sqoop error while trying to connect to MySql

0 votes

Hi, 

I am running below sqoop command but getting error. I'm using edureka VM

[edureka@localhost ~]$ sqoop import \
> --connect "jdbc:mysql://local/mydb" \
> --user root \
> --password Edurekasql_123 \
> --table elections \
> --target-dir /Test \
> -m 1;
Warning: /usr/lib/sqoop-1.4.6.bin__hadoop-2.0.4-alpha/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/sqoop-1.4.6.bin__hadoop-2.0.4-alpha/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/lib/sqoop-1.4.6.bin__hadoop-2.0.4-alpha/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/12/22 21:58:02 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Error parsing arguments for import:
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: --user
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: root
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: --password
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: Edurekasql_123
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: --table
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: elections
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: --target-dir
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: /Test
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: -m
18/12/22 21:58:02 ERROR tool.BaseSqoopTool: Unrecognized argument: 1
May 22 in Big Data Hadoop by Esha
40 views

1 answer to this question.

0 votes

Please use the below command to solve the problem :

sqoop import --connect jdbc:mysql://localhost/mydb --username root --password Edurekasql_123 --table elections --target-dir /Test1 -m 1;
answered May 22 by Bhagavath

Related Questions In Big Data Hadoop

0 votes
1 answer

Sqoop import failed while importing mysql table to Hbase

There is a spelling mistake in your ...READ MORE

answered Feb 6 in Big Data Hadoop by Omkar
• 67,290 points
144 views
0 votes
1 answer

Sqoop error while importing data from MySql

As the error states, the target directory ...READ MORE

answered Feb 11 in Big Data Hadoop by Omkar
• 67,290 points
39 views
0 votes
1 answer
0 votes
1 answer

Error while copying the file from local to HDFS

Well, the reason you are getting such ...READ MORE

answered May 2, 2018 in Big Data Hadoop by Ashish
• 2,630 points
404 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,510 points
2,412 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,510 points
246 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
12,247 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,240 points
900 views
0 votes
1 answer

Sqoop getting error while connecting to MySQL

Have you set a password for MySQL? ...READ MORE

answered Feb 7 in Big Data Hadoop by Omkar
• 67,290 points
42 views
0 votes
1 answer

Error while hitting the hadoop jar command to execute my map reduce

Since your jar file was inside the ...READ MORE

answered Feb 11 in Big Data Hadoop by Omkar
• 67,290 points
53 views