Getting connection refused in sqoop from mysql DB


#1

Getting “connection refused” while sqooping data from mysql DB on nn01.itversity.com:

[jainshanil@gw02 ~]$ sqoop list-tables --connect “jdbc:mysql://nn01.itversity.com:3036/retail_db” --username retail_dba -P
Warning: /usr/hdp/2.6.5.0-292/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
18/08/11 21:55:24 INFO sqoop.Sqoop: Running Sqoop version: 1.4.6.2.6.5.0-292
Enter password:
18/08/11 21:55:30 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
18/08/11 21:55:30 ERROR manager.CatalogQueryManager: Failed to list tables
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

I am able to login to mysql DB but sqoop errors out.
Pls have a look.


#2

@Shanil_Jain

Incorrect port number in the above command your using.

Try below command:
sqoop list-tables --connect "jdbc:mysql://nn01.itversity.com:3306/retail_db" --username retail_dba -P


#3

My bad … thanks ! it worked


#4