Unable to import data from mysql to HDFS through Sqoop
6 Answer(s)
Abhijit-Dezyre Support
Hi Sarvani,
Please download and refer the document.
https://www.dropbox.com/s/ke886weetbk7cad/sqoop_meetup_kate_ting_110711.pdf?dl=0
Hope
or you can also refer this thread : http://stackoverflow.com/questions/12852695/apache-sqoop-communication-link-failure
Oct 22 2015 02:04 AM
Please download and refer the document.
https://www.dropbox.com/s/ke886weetbk7cad/sqoop_meetup_kate_ting_110711.pdf?dl=0
Hope
or you can also refer this thread : http://stackoverflow.com/questions/12852695/apache-sqoop-communication-link-failure
Sarvani
Thanks for the quick reply.
I have already tried those solutions.
I am able to connect to mysql by this command(localhost)
mysql -h localhost -P 3306 -u root -p
But when I'm trying to do above import command, getting the above error.
and
I'm not able to connect to mysql with my hostname or ipaddress
mysql -h hostname -P 3306 -u root -p
My server hostname or ipaddress in which mysql and sqoop was installed is not able to connect to mysql.
Oct 22 2015 03:45 AM
I have already tried those solutions.
I am able to connect to mysql by this command(localhost)
mysql -h localhost -P 3306 -u root -p
But when I'm trying to do above import command, getting the above error.
and
I'm not able to connect to mysql with my hostname or ipaddress
mysql -h hostname -P 3306 -u root -p
My server hostname or ipaddress in which mysql and sqoop was installed is not able to connect to mysql.
Athian
Please try this. sqoop import --connect "jdbc:mysql://localhost/sept27Batch" --username root --password 123456 -table author --target-dir /Sqoop/Sept27Batch/authTable -m 1
Oct 22 2015 04:10 AM
Abhijit-Dezyre Support
To solve any mysql related issue , follow the following advices:
Verify and test them with ping.
Refresh DNS or use IP address in JDBC URL instead.
Verify it based on my.cnf of MySQL DB.
Start the DB.
Verify if mysqld is started without the --skip-networking option.
Restart the DB and fix your code accordingly that it closes connections in finally.
Disable firewall and/or configure firewall/proxy to allow/forward the port.
Oct 22 2015 04:54 AM
Verify and test them with ping.
Refresh DNS or use IP address in JDBC URL instead.
Verify it based on my.cnf of MySQL DB.
Start the DB.
Verify if mysqld is started without the --skip-networking option.
Restart the DB and fix your code accordingly that it closes connections in finally.
Disable firewall and/or configure firewall/proxy to allow/forward the port.
DeZyre Support
hi Sarvani,
Check if you are able to connect to mysql with a valid username/password. Once it is confirmed use the below command to import (change the database/table names)
sqoop import \
--connect jdbc:mysql://localhost/employees \
--username root \
--password cloudera \
--table departments \
-m 4 \
--target-dir /user/cloudera/deps
Oct 27 2015 06:47 PM
Check if you are able to connect to mysql with a valid username/password. Once it is confirmed use the below command to import (change the database/table names)
sqoop import \
--connect jdbc:mysql://localhost/employees \
--username root \
--password cloudera \
--table departments \
-m 4 \
--target-dir /user/cloudera/deps