国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > MySQL > 正文

Mysql SSL問題

2024-07-24 12:59:30
字體:
供稿:網(wǎng)友

前端時間在阿里云上安裝MySQL 版本是5.7,安裝完成程序連接數(shù)據(jù)庫一直連不上具體錯誤為:

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

原來是5.7版本后連接需要使用SSL安全連接,不過一般數(shù)據(jù)庫都是在內(nèi)網(wǎng)或者在開發(fā)測試環(huán)境下都沒必要使用SSL連接。

解決方法就是在jdbc-url的時候加入ssl

jdbc:mysql://127.0.0.1:3306/apps?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&zeroDateTimeBehavior=convertToNull&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&autoReconnect=true&failOverReadOnly=false&useSSL=true

這樣連接查詢數(shù)據(jù)庫的時候會要求使用證書,不過因為我們用了密碼驗證整數(shù)否則獲取不到連接 &verifyServerCertificate=false加上這個參數(shù)可以避免這個問題


發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 新余市| 三江| 泰宁县| 江西省| 长顺县| 军事| 五原县| 辽源市| 渭南市| 黑水县| 特克斯县| 清流县| 山阳县| 大田县| 琼结县| 和龙市| 青海省| 南投县| 安吉县| 平乐县| 句容市| 太和县| 彰武县| 额尔古纳市| 伽师县| 威海市| 柯坪县| 沛县| 新安县| 长兴县| 启东市| 左贡县| 永德县| 冷水江市| 高雄县| 黔南| 常州市| 迭部县| 长宁区| 榆林市| 吉林省|