SQOOP TimeOut issue from HDFS



0
I'm getting a timeout error while trying to import the MYSQL table into HDFS.

Error "com.mysql.jdbc.exceptions.jdbc4communicatins exception communication link error"

Steps followed:
I downloaded imysql connector .26 from http://dev.mysql.com/downloads/connector/j/,
picked "Platform Independent" , selected tar format, and downloaded mysql-connector-java-5.1.26.tar.gz.
Untar the package into Local c: and filezilla copy into local dir /home/cloudera/ash
next login to VM and went to cd /home/cloudera/ash and copied the jar file to /usr/lib/sqoop/lib using command
sudo cp mysql-connector-java-5.1.31-bin.jar /usr/lib/sqoop/lib/

2 Answer(s)


0

So I turned off my firewall and now I am getting a different error "Access denied for user 'root'@'192.168.11.139'

I ran this command on MySQL after finding the ip on HDFS using ifconfig
>> GRANT ALL ON *.* TO root@192.168.11.139 IDENTIFIED by 'root' WITH GRANT ON OPTION;

Next followed these steps on HDFS
#1. cd /usr/lib/sqoop
#2. sqoop import --connect jdbc:mysql://192.168.11.1/ash --table player --username root -P --target-dir /user/cloudera/sqoopOut1 -m 2

any help will be appreciated

0

hi Ashley,

Please confirm if the database name is "ash" as provided in the sqoop command. Here is how a particular table data can be imported to HDFS

sqoop import -connect jdbc:mysql://localhost:3306/ -username root -password password --table tableName --target-dir /user/cloudera/tableName -m 2

Please try the above format and let us know if the issue is resolved.
Thanks