問題:
在使用MyBatis的項(xiàng)目中,升級了數(shù)據(jù)庫驅(qū)動的版本,在項(xiàng)目啟動過程中,拋出了Public Key Retrieval is not allowed異常。
解決方式:
在項(xiàng)目的JDBC連接數(shù)據(jù)庫的url中,加上allowPublicKeyRetrieval=true參數(shù),已驗(yàn)證可以解決該問題。
連接示例
jdbc:mysql://localhost:3306/xxx?useUnicode=true&characterEncoding=utf8&rewriteBatchedStatements=true&useSSL=false
&serverTimezone=UTC&allowPublicKeyRetrieval=true