Sqoop Import --password-file function not working properly in sqoop 1.4.4
As per the sqoop documentation
You should save the password in a file on the users home directory with 400 permissions and specify the path to that file using the
--password-file argument
, and is the preferred method of entering credentials. Sqoop will then read the password from the file and pass it to the MapReduce cluster using secure means with out exposing the password in the job configuration. The file containing the password can either be on the Local FS or HDFS.
If I am running my sqoop job with root user then my password file will be in /user/root/
in HDFS
sqoop import --connect jdbc:mysql://database.example.com/employees \ --username venkatesh --password-file /user/root/database.password
For more details you can check this