Caused by: java.sql.SQLException: Access denied for user 'root'@'slave2' (using password: YES)
当我们使用sqoop将MySQL的数据传输到HDFS中时出现以上报错
原因:在MySQL数据库中没有设置slave中的权限
使用以下命令调整用户权限
grant all privileges on *.* to root@'%' identified by 'your password';
grant all privileges on *.* to root@'your IP' identified by 'your password';
flush privileges;