签到成功

知道了

CNDBA社区CNDBA社区

Sqoop jdbc 连接 MySQL 驱动包com.mysql.cj.jdbc.Driver 问题解决方法

2019-03-02 23:42 10690 0 原创 Sqoop
作者: dave

Sqloop 通过jdbc 连接Mysql数据库,提示驱动过期,如下:http://www.cndba.cn/dave/article/3302http://www.cndba.cn/dave/article/3302http://www.cndba.cn/dave/article/3302

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

[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.http://www.cndba.cn/dave/article/3302http://www.cndba.cn/dave/article/3302

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

这里的解决方法就是降低了mysql jdbc包的版本,从mysql-connector-java-8.0.15.jar降低到mysql-connector-java-5.1.47.jar后,恢复正常。 http://www.cndba.cn/dave/article/3302

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


[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]$

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

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

dave

关注

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

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

        QQ交流群

        注册联系QQ