这是控制台的错误信息
Thu Sep 02 00:00:28 CST 2021 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.
9月 02, 2021 12:00:29 上午 com.alibaba.druid.support.logging.JakartaCommonsLoggingImpl error
严重: create connection SQLException, url: jdbc:mysql://localhost:3306/hudada, errorCode 0, state 01S00
不知道为什么这里的url,username,password 会变红色
这都困扰我几天了,上网也搜不到,求助大佬解答
改改你的 url,看起来 jdbc:mysql://localhost:3306/hudada 没有启动SSL,直接在链接后面添加 ?useSSL=false ,试试。
下面是我 使用 spring boot 时配置的一个url:
spring.datasource.url=jdbc:mysql://myhost:3306/db_example?useSSL=false&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
仅供参考