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,280 points
870 views

1 answer to this question.

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,810 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
• 67,660 points
301 views
0 votes
0 answers

Sqoop could not load db driver class

I am trying to connect postgres with ...READ MORE

Oct 25 in Big Data Hadoop by Ritu
• 120 points

edited Oct 25 by Ritu 48 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
• 13,300 points
283 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
• 67,660 points
467 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
• 67,660 points
173 views
0 votes
13 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
10,478 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,810 points
290 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,810 points
471 views