Sqoop fails "No columns to generate for ClassWriter"

I am running the below command on lnux to execute the sqoop job.

sqoop import --connect jdbc:mysql://ip-172-31-13-154/sqoopex --table widgets -m 2 --username sqoopuser -P --split-by id

I got the following error …

sqoop import --connect jdbc:mysql://ip-172-31-13-154/sqoopex --table widgets -m 2 --username sqoopuser -P --split-by id

I have given mysql password corretecly still it is throwing error.

Hi, Sandu.
Please see the correct IP address of Mysql and path.

Below Comnand can be helpful

Mysql Path:-

/data/jars/mysql-connector-java-5.1.36-bin.jar

Command to copy file from MYSQL table widgets to HDFS folder widgets_import

import --connect jdbc:mysql:ip-172-31-13-154:3306/sqoopex --username sqoopuser --password NHkkP876rp --table widgets --target-dir hdfs:///user/yourlogin_username/widgets_import

It should work, it worked for me.

All the best.