【发布时间】:2016-09-06 17:26:50
【问题描述】:
我想将密码存储到一个文件中,然后在 sqoop 命令中使用它。
根据 sqoop 文档--password-file 选项允许我们存储密码。所以我将它存储在 pwd 文件中,密码只有 abc 文本。 & 点击以下命令。
sqoop import --connect jdbc:mysql://localhost:3306/db --username bhavesh --password-file /pwd --table t1 --target-dir '/erp/test'
假设 pwd 文件存储在 HDFS 上
因此我收到以下错误:
java.sql.SQLException: Access denied for user 'bhavesh'@'localhost' (using password: YES)
当我使用 -p 选项执行相同的操作时,它对我来说很好。
【问题讨论】:
-
对于普通的 sqoop 导入,你试过了吗? stackoverflow.com/a/36818269/1250410
标签: sqoop