今天课设,下载了一个Mysql来使用,Java连接数据据,然后呢出现这个恶心的问题(Java小白)

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.
然后了解到是Mysql版本问题,要使用SSL,所以我们在连接出添加一下代码即可

&useSSL=true
当然如果你数据库来连接会出现“?,?,?,?”的乱码,你可以加入
useUnicode=yes&characterEncoding=utf8
这就是我遇到的一些问题,希望对你有所帮助。
留言