Sqoop import Access denied for user ‘root‘@‘hostname‘ (using password: YES)
程序员文章站
2024-03-14 17:35:40
...
测试环境:112(Hadoop NN,MySQL,Sqoop),113(Hadoop DN),114(Hadoop DN)
112服务器:
sqoop import
--connect jdbc:mysql://BigData112:3306/ke
--username root
--password Welcome_1
--table user
--m 1
--target-dir /input/tools
--delete-target-dir
#参数解释
- --connect 指定mysql链接地址
- --username 连接mysql的用户名
- --password 连接mysql的密码
- --table 指定要导入的mysql表名称
- --m 表示这个MR程序需要多少个MapTask去运行,默认为4
- --target-dir 指定导出目的地,默认路径是/user/hadoop下
- --delete-target-dir 判断导出目录是否存在,如果存在就删掉
异常信息:Caused by: java.sql.SQLException: Access denied for user 'root'@'BigData114' (using password: YES)
解决方案:MySQL的root用户权限问题(注意是114服务器BigData114)
mysql> grant all privileges on *.* to 'root'@'BigData114' identified by '你的密码';
Query OK, 0 rows affected, 1 warning (0.01 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)
推荐阅读
-
Sqoop import Access denied for user ‘root‘@‘hostname‘ (using password: YES)
-
mysql Access denied for user ‘root’@’localhost’ (using password: YES)解决方法
-
Linux连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决
-
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
-
MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)问题的解决
-
ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
-
MYSQL ERROR 1045 (28000): Access denied for user (using password: YES)问题的解决
-
ERROR 1045: Access denied for user: root@localhost (Using password: NO)
-
win10下MySQL 8.0登录Access denied for user‘root’@‘localhost’ (using password: YES)问题的解决方法
-
Linux连接mysql报错:Access denied for user ‘root’@‘localhost’(using password: YES)的解决