You need to specify the port number, by default it is 3306 for Mysql. Please check your port number and mention the same with the IP, for example:
[cloudera@localhost sqoop]$ bin/sqoop import --connect jdbc:mysql://192.168.199.1:3306/world --table city --username abc -P --target-dir /user/cloudera/class-8/ev/sqoopOut1 -m 2
Please try the following and make sure you have mysql connection driver available in the sqoop library.
Hope this helps.
I already tried that too with port no. but it is not working. I have mysql connector jar in sqoop. But the same error comes. May be it is a priviledge problem. If u can give a code other then grant priviledges it may help. Please Help. Thanks