先通过可视化工具链接mysql,在链接的时候用sqoop 用户登录

22.把hive表中数据导入到mysql中

22.把hive表中数据导入到mysql中

 

 

在数据库userdb下新建表

22.把hive表中数据导入到mysql中

22.把hive表中数据导入到mysql中

 

保存,输入表名upflow

 

 22.把hive表中数据导入到mysql中

 

 

现在我们需要把hive里面的数据通过sqoop导入到mysql里面

sqoop export --connect \
 jdbc:mysql://node1:3306/userdb \
 --username sqoop --password sqoop --table upflow --export-dir \
/user/hive/warehouse/mydb2.db/upflow --input-fields-terminated-by ','

 

 

22.把hive表中数据导入到mysql中

 

可以看到mysql的数据

 22.把hive表中数据导入到mysql中

 

相关文章: