1 Sqoop列出所有表
下面的命令用于列出MySQL数据库服务器employees数据库下的所有的表:
[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数据库服务器的所有数据库:
[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]$
版权声明:本文为博主原创文章,未经博主允许不得转载。
- 上一篇:Sqoop 创建导出导入作业
- 下一篇:Sqoop Eval工具使用说明