sqoop找不到MySQL驱动_Sqoop jdbc 连接 MySQL 驱动包com.mysql.cj.jdbc.Driver 问题解决方法...

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

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

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

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

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

这里的解决方法就是降低了mysql jdbc包的版本,从mysql-connector-java-8.0.15.jar降低到mysql-connector-java-5.1.47.jar后,恢复正常。

https://www.cndba.cn/cndba/dave/article/3302https://www.cndba.cn/cndba/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]$

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

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值