-
Create password using command
echo -n "myPassword" > sqoop.password
-
Upload the file to HDFS as the file needs to be present in HDFS
hadoop fs -put sqoop.password /user/keepMyFilesHere
-
Write the scoop import command
sqoop list-tables --connect jdbc:mysql://localhost/kpdatabase --username root --password-file /user/karanpreet.singh/sqoop.password
This will definitely work!