签到成功

知道了

CNDBA社区CNDBA社区

Sqoop 列出所有库和表

2019-03-03 03:06 2992 0 原创 Sqoop
作者: dave

1 Sqoop列出所有表

下面的命令用于列出MySQL数据库服务器employees数据库下的所有的表:

http://www.cndba.cn/dave/article/3310
http://www.cndba.cn/dave/article/3310http://www.cndba.cn/dave/article/3310

[dave@www.cndba.cn data]$ sqoop list-tables --connect jdbc:mysql://192.168.56.2:3306/employees --username root --password root
Warning: /home/hadoop/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /home/hadoop/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /home/hadoop/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
2019-03-03 03:03:56,689 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2019-03-03 03:03:56,840 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
2019-03-03 03:03:57,058 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Sun Mar 03 03:03:57 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
current_dept_emp
dave
departments
dept_emp
dept_emp_latest_date
dept_manager
employees
salaries
titles
[dave@www.cndba.cn data]$

2 Sqoop列出数据库

下面的命令用于列出MySQL数据库服务器的所有数据库:http://www.cndba.cn/dave/article/3310http://www.cndba.cn/dave/article/3310

http://www.cndba.cn/dave/article/3310
http://www.cndba.cn/dave/article/3310http://www.cndba.cn/dave/article/3310http://www.cndba.cn/dave/article/3310
http://www.cndba.cn/dave/article/3310

[dave@www.cndba.cn data]$  sqoop list-databases --connect jdbc:mysql://192.168.56.2:3306 --username root --password root
Warning: /home/hadoop/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /home/hadoop/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /home/hadoop/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
2019-03-03 03:05:11,374 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
2019-03-03 03:05:11,508 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
2019-03-03 03:05:11,683 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Sun Mar 03 03:05:12 CST 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
information_schema
cndba
employees
mysql
performance_schema
sys
[dave@www.cndba.cn data]$

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2261
    原创
  • 3
    翻译
  • 578
    转载
  • 191
    评论
  • 访问:7995640次
  • 积分:4346
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ