持久化mysql时指定数据库
编辑application.properties spring.datasource.platform=mysql db.num=1 db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&serverTimezone=Asia/Shanghai db.user=** db.password=****
集群文件设置:
输入 hostname -I
172.31.203.157.3333 4444 5555 三个节点

版本在1.3.1以下时数据据库是5.xx,不支持mysql8.0 需要在,1.3.1以及以上版本支持mysql8.0
在windows下nacos目录下新建mysql文件夹
下载mysql8.0的jar包放进去可解决兼容性问题

linux下也是如此:

通过nginx配置访问集群:

配置集群:
一:

二:

如果输入命令 ps -ef|grep nacos |grep -v gep |wc -l
发现节点不是三个就修改虚拟机内存
如下,我的内存小根据内存大小合理设置:
