Sqoop: Could not load mysql driver exception.

0 votes

I Installed Sqoop in my local machine. Following are the config information.

Bash.bashrc:

export HADOOP_HOME=/home/hduser/hadoop
export HBASE_HOME=/home/hduser/hbase
export HIVE_HOME=/home/hduser/hive
export HCAT_HOME=/home/hduser/hive/hcatalog
export SQOOP_HOME=/home/hduser/sqoop

export PATH=$PATH:$HIVE_HOME/bin
export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HBASE_HOME/bin
export PATH=$PATH:$SQOOP_HOME/bin
export PATH=$PATH:$HCAT_HOME/bin

Hadoop:

Version: Hadoop 1.0.3

Hive:

Version: hive 0.11.0 

Mysql Connector driver

version: mysql-connector-java-5.1.29

"The driver is copied to the lib folder of sqoop"

Sqoop :

version: sqoop 1.4.4

After making all the installation I create a table in mysql named practice_1, But when I run the load command to load data from mysql to hdfs the command throws an exception:

ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.RuntimeException: Could not     load db driver class: com.mysql.jdbc.Driver

Oct 8, 2018 in Big Data Hadoop by Neha
• 6,140 points
371 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

You need database driver in 'SQOOP' classpath check this It has wonderful explanation about the 'SQOOP'

SQOOP has other options like

Ex: --driver com.microsoft.jdbc.sqlserver.SQLServerDriver -libjars=".*jar"

from here

You can use Sqoop with any other JDBC-compliant database. First, download the appropriate JDBC driver for the type of database you want to import, and install the .jar file in the $SQOOP_HOME/lib directory on your client machine. (This will be /usr/lib/sqoop/lib if you installed from an RPM or Debian package.) Each driver .jar file also has a specific driver class which defines the entry-point to the driver. For example, MySQL's Connector/J library has a driver class of com.mysql.jdbc.Driver. Refer to your database vendor-specific documentation to determine the main driver class. This class must be provided as an argument to Sqoop with --driver

answered Oct 8, 2018 by Frankie
• 9,590 points

Related Questions In Big Data Hadoop

0 votes
1 answer

Sqoop: java.lang.RuntimeException: Could not load db driver class: com.mysql.jdbc.Driver

Seems like you don't have MySQL connector ...READ MORE

answered Jan 28 in Big Data Hadoop by Omkar
• 65,850 points
63 views
0 votes
1 answer

Could not find the Sqoop directory in HDP 2.2

You can find the Sqoop lib directory ...READ MORE

answered May 4, 2018 in Big Data Hadoop by Shubham
• 12,270 points
223 views
0 votes
1 answer

Hadoop Mapreduce: Error: Could not find or load main class com.sun.tools.javac.Main

You have to add HADOOP_CLASSPATH environment parameter: export ...READ MORE

answered Oct 30, 2018 in Big Data Hadoop by Omkar
• 65,850 points
196 views
0 votes
1 answer

Hadoop MacOS: formatting namenode: Could not find or load main class

You need to point the HADOOP_PREFIX to ...READ MORE

answered Nov 13, 2018 in Big Data Hadoop by Omkar
• 65,850 points
67 views
0 votes
1 answer

Sqoop transfer file from MySql to HBase

Sqoop doesn’t permit you to import, all ...READ MORE

answered Feb 11 in Big Data Hadoop by Omkar
• 65,850 points
39 views
0 votes
12 answers

What is the difference between Hadoop/HDFS & HBase?

HDFS is a distributed file system whereas ...READ MORE

answered Apr 26 in Big Data Hadoop by Arihar
• 160 points
4,242 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Will hadoop(sqoop) load oracle faster than SQL loader?

down vote Had a similar task of exporting ...READ MORE

answered Sep 4, 2018 in Big Data Hadoop by Frankie
• 9,590 points
170 views
+1 vote
1 answer

What is the process to perform an incremental data load in Sqoop?

The process to perform incremental data load ...READ MORE

answered Dec 17, 2018 in Big Data Hadoop by Frankie
• 9,590 points
142 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.