nacos2.x版本持久化中mysql版本为8.x问题解决

nacos版本:2.0.3
mysql:8.x

此时持久化配置的时候需要给nacos配置文件中数据库连接配置添加以下信息:

allowPublicKeyRetrieval=true

完整配置:

spring.datasource.platform=mysql
db.num=1
# note: must use ruoyi-mysql as the database service, can't use localhost or 127.0.0.1. Nacos will try to connect the ip:3306 from the docker contain, not the host machine
db.url.0=jdbc:mysql://ruoyi-mysql:3306/ry-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true
db.user=root
db.password=mysqladmin

版权声明:本文为qq_43631716原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。