CDH3 Error while importing data from Sqoop



0
Below is the sqoop command i am trying to execute on CDH3
sqoop import --connect jdbc:mysql://192.168.138.1/dezyre
root -P --target-dir /user/cloudera/sqoopOut1
--table player --username
-m 1

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

What are the steps to configure the MySql driver for CDH3 for the successful execution of the Sqoop import command?


1 Answer(s)


0

hi,

Can you confirm if the mysqlj driver has been downloaded and copied to "lib" location of Sqoop. without that Sqoop will not be able to connect to the target database. Once the mysqlj connector is in place, execute the command as below

sqoop import --connect jdbc:mysql://localhost:3306/employees --username root --password password123 --table departments --target-dir employees_data2

Thanks