当前位置:网站首页>Nacos persistent switch configuration
Nacos persistent switch configuration
2022-04-22 07:12:00 【Add soldier】
Nacos Persistent configuration
Nacos Embedded database is provided by default derby, So we create one at a time Nacos The instance will have one derby, When there is more than one Nacos Node time , There will be consistency issues , therefore Nacos It supports the unified data management of external database MySql.

Nacos Default derby Switch MySql
For specific configuration methods, please refer to the official website :https://nacos.io/zh-cn/docs/deployment.html
-
We need to find Nacos Install under directory conf In the directory Sql Script , Then execute in the database
Be careful : We need to create the database and use :
CREATE DATABASE nacos_config; USE nacos_config;

- modify conf/application.properties file , Increase support mysql Data source configuration ( Currently only supported mysql), add to mysql Data sources url、 User name and password .
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=UTC
db.user=root
db.password=root
Here means change Nacos The database is native MySql database
Be careful : Here are a few points to note , One is url The address needs to be changed , In addition, the user and password of the database also need to be changed , At the same time, there is another one on the official website db.url.0=jdbc:mysql One attribute missing from this attribute is serverTimezone=UTC We need to manually add
test
restart Nacos service , Previously created Namespace+Group+DataID It will all disappear , Because these data are saved before Nacos embedded derby In the database , Now it's local MySql database , At this point, we can add configuration tests , Looking at the database nacos_config Medium config_info surface , At this time, there will be newly added configuration content
Database nacos_config Medium config_info surface , At this time, there will be newly added configuration content
版权声明
本文为[Add soldier]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204220608310669.html
边栏推荐
- pyautocad 选择对象报错的解决方案
- Introduction to IC Analog Layout - learning notes on layout Basics (5)
- STM32 learning record - development environment installation
- Replace rtd2171u | cs5266 design circuit | type C to HDMI scheme | cs5266an
- Application of mcicecan in industrial computer
- 论文快速阅读的方法技巧
- Digital IC design, after learning Verilog syntax, what else do you need to learn?
- 从 Spec.到芯片_(数字IC、模拟IC、FPGA/CPLD设计的流程及EDA工具)
- 集成电路模拟版图入门-版图基础学习笔记(五)
- Nacos服务消费者注册和负载均衡
猜你喜欢

从 Spec.到芯片_(数字IC、模拟IC、FPGA/CPLD设计的流程及EDA工具)

C技能树测评——0415体验日记

Digital IC design and CS?

STM32学习记录0003——STM32芯片解读

.NET学习笔记----关于.NET Core那些事(3)【配置文件的读取、json文件的通用解析、读取静态文件】

STM32学习记录0004——ISP串口下载

Introduction to IC Analog Layout - learning notes on layout Basics (I)

Introduction to IC Analog Layout - learning notes on layout Basics (5)

Nacos集群配置

数字ic设计有前途吗?职业发展,薪资待遇如何?
随机推荐
Alibaba cloud's deployment of tiny RSS
Typical application cases of can optical fiber converter and can bus optical transceiver in fire Networking (buildings, factories, offshore wind power, pipe gallery, etc.)
Sad process from Fab factory to IC Verification
RT thread sensor software package classification
SQL题目练习总结
STM32 timer generates event Tim_ GenerateEvent
leetcode 617 合并二叉树
Application of CAN bus relay bridge in new energy test system.
什么是socket编程?
再见了Postman,有一说一:Apifox才是YYDS
STM32 learning record - development environment installation
数字IC设计自学入门难吗?如何快速入门呢?
阿里云部署RSSHub踩坑笔记
Digital IC design and CS?
分布式任务调度与计算框架:PowerJob 高级特性-OpenAPI 04
How to become an IC Verification Engineer?
Nacos服务注册中心对比提升
C技能树测评——0415体验日记
芯片设计怎样准备即将面临的秋季补招和来年的春招?
Fire fighting equipment optical fiber networking can to optical fiber converter