datax-web链接不到mysql的方法

 

1
2
来自
https://blog.csdn.net/qq_41785135/article/details/85118329

  

报错

Thu Dec 20 12:50:09 CST 2018 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.

不建议在没有服务器身份验证的情况下建立SSL连接,根据MySQL 5.5.45+、5.6.26+和5.7.6+的要求,如果没有设置显式选项,则必须默认建立SSL连接。为了符合不使用SSL的现有应用程序,verifyServerCertificate属性被设置为“false”。您需要通过设置useSSL=false显式禁用SSL,或者设置useSSL=true并为服务器证书验证提供信任存储。

经过翻译后是不是很清晰了,不建议在没有服务器身份验证的情况下建立SSL连接,只是不建议,如果你执意这么做的话呢,当然可以无视,那么如果你接受了人家的建议,该怎么解决这个问题呢?很简单,在你连接数据库的url后面加上参数即可,例如:

jdbc:mysql://localhost:3306/testdb?useSSL=false

使用上述标红的URL,即可解决该警告,标红参数前面为你数据库连接URL,如果有多个参数记得用&连接,例如

jdbc:mysql://localhost:3306/testdb?characterEncoding=utf-8&useSSL=false

posted @   皇甫二牛  阅读(392)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
点击右上角即可分享
微信分享提示