Sqloop 通过jdbc 连接Mysql数据库,提示驱动过期,如下:
[dave@www.cndba.cn lib]$ sqoop list-databases --connect jdbc:mysql://192.168.56.2:3306/ --username root -P
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.
r2019-03-02 23:05:58,389 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
Enter password:
2019-03-02 23:06:00,091 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
….
提示com.mysql.jdbc.Driver过期,新的驱动是:com.mysql.cj.jdbc.Driver.
这里的解决方法就是降低了mysql jdbc包的版本,从mysql-connector-java-8.0.15.jar降低到mysql-connector-java-5.1.47.jar后,恢复正常。
[dave@www.cndba.cn lib]$ sqoop list-databases --connect jdbc:mysql://192.168.56.2:3306 --username dave -P
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.
da2019-03-02 23:34:14,058 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
Enter password:
2019-03-02 23:34:15,409 INFO manager.MySQLManager: Preparing to use a MySQL streaming resultset.
Sat Mar 02 23:34:15 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
mysql
performance_schema
sys
[dave@www.cndba.cn lib]$
版权声明:本文为博主原创文章,未经博主允许不得转载。