sqoop list-databases \
--connect "jdbc:mysql://nn01.itversity.com:3306" \
--username retail_dba \
--password itversity
#Make sure there is no directory specified in target-dir
#Also make sure you replace dgadiraju with appropriate user name
#For Cloudera or Hortonworks based VM environments you can change nn01.itversity.com
#to appropriate host names or localhost
sqoop import \
--connect "jdbc:mysql://nn01.itversity.com:3306/retail_db" \
--username=retail_dba \
--password=itversity \
--table departments \
--target-dir=/user/dgadiraju/demo/departments