Sqoop Command with Secure Password

There are different way to secure sqoop password. following are the different method to secure sqoop password while running script.

1. Use — password Option with Sqoop Command

$sqoop import –connect jdbc:mysql://localhost/MYDB \ –username testuser \ –password **** \ –table EMPLOYEE

2. Use — P Option with Sqoop Command

$sqoop import –connect jdbc:mysql://localhost/MYDB \ –username testuser — P –table EMPLOYEE

Following video will give you better way. SUBSCRIBE to the channel for future videos.

3. Use – password-file Option with Sqoop Command

$echo -n “password” > /etc/sqoop/conf/passwords/mysql-password.txt

$chmod 400 /etc/sqoop/conf/passwords/mysql-password.txt

$sqoop import –connect jdbc:mysql://localhost/MYDB –username testuser \ –table ORDERS \ –password-file /etc/sqoop/conf/passwords/mysql-pass.txt

Leave a Reply

Your email address will not be published. Required fields are marked *