Getting connection refused in sqoop from mysql DB


Getting “connection refused” while sqooping data from mysql DB on

[jainshanil@gw02 ~]$ sqoop list-tables --connect “jdbc:mysql://” --username retail_dba -P
Warning: /usr/hdp/ 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:
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(

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



Incorrect port number in the above command your using.

Try below command:
sqoop list-tables --connect "jdbc:mysql://" --username retail_dba -P


My bad … thanks ! it worked