Please try to add the "--driver" option in your sqoop command as following and then try again:
# sqoop import --connect jdbc:mysql://localhost/hadoopguide \ --table widgets -m 1 --driver 'com.mysql.jdbc.Driver'
- Also please make sure that your mysql is listening to the correct port. The default MySQL port is 3306
- The MySQL "" JDBC driver jar is present inside the sqoop-client lib directory properly like following:
# cp -f /usr/share/java/mysql-connector-java.jar /usr/hdp/current/sqoop-client/lib/
You should also try specifying the db suername & password names.
-username dbUser --password dbPassword