jdbc:mysql://localhost:3306/steam?unicode=utf8
根據MySQL 5.5.45 +,+,+ 5.6.26 5.7.6要求SSL連接必須建立明確的選項默認情況下如果不設置。符合現有的應用程序不使用SSL的verifyservercertificate屬性設置爲“false”。你需要顯式禁用SSL設置usessl = false,或設置usessl =真實提供服務器證書驗證信任庫;
修改url爲:
jdbc:mysql://localhost:3306/snail?useUnicode=true&characterEncoding=utf-8&useSSL=false
注意要使用 & 符號,否則spring的配置文件會報錯;useSSL=false不使用服務器驗證;
二.mysql8.0對jdbc驅動版本有要求,使用
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> <scope>runtime</scope> </dependency>三.The server time zone value 'Öйú±ê׼ʱ¼ä' is unrecognized or represents more than one time zone異常
需要修改時區