当前位置:网站首页>Configuration and use of Nacos external database
Configuration and use of Nacos external database
2022-07-29 06:05:00 【Spicy next door 4】
stay nacos When configuring the cluster , If you use its built-in database derby There will be asymmetry and asynchrony of data configuration .
The above is on the official website nacos Service configuration diagram . Let's assume that now nacos Yes 3 Taiwan machine .101,102,103. If you use the built-in service database , Then these three nacos Each has its own database . If we configure and register files in each machine , It's troublesome to modify . And you can't guarantee the synchronous update of data files . It is prone to omission and asymmetry . therefore nacos The official website provides us with the method of external database . Three nacos Uniform configuration nacos.
step :
1. Build in your database nacos database . take mysql Script file import . The address of the script file :https://github.com/alibaba/nacos/blob/master/distribution/conf/nacos-mysql.sql
2. modify nacos Medium mysql Connection configuration :
spring.datasource.platform=mysql
db.num=1
db.url.0=jdbc:mysql://localhost:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true
db.user=root
db.password=123456Be careful : The location of this configuration must be in the location specified , If you can't find it mysql To configure . start-up nacos Will report a mistake , I can't get up .

When the configuration is complete , start-up nacos, You can change to your own mysql Database , Finally, Zhang Tu Zhenlou :

边栏推荐
- PyTorch中的模型构建
- 【ML】机器学习模型之PMML--概述
- Realize the scheduled backup of MySQL database in Linux environment through simple script (mysqldump command backup)
- DCAT batch operation popup and parameter transfer
- Nailing alarm script
- mysql 的show profiles 使用。
- 【Transformer】TransMix: Attend to Mix for Vision Transformers
- anaconda中移除旧环境、增加新环境、查看环境、安装库、清理缓存等操作命令
- 【语义分割】Mapillary 数据集简介
- 【Transformer】AdaViT: Adaptive Vision Transformers for Efficient Image Recognition
猜你喜欢
随机推荐
【ML】机器学习模型之PMML--概述
[pycharm] pycharm remote connection server
电脑视频暂停再继续,声音突然变大
mysql插入百万数据(使用函数和存储过程)
Detailed explanation of MySQL statistical function count
【数据库】数据库课程设计一一疫苗接种数据库
Basic use of array -- traverse the circular array to find the maximum value, minimum value, maximum subscript and minimum subscript of the array
主流实时流处理计算框架Flink初体验。
SQL repair duplicate data
[overview] image classification network
并发编程学习笔记 之 Lock锁及其实现类ReentrantLock、ReentrantReadWriteLock和StampedLock的基本用法
【Attention】Visual Attention Network
30 knowledge points that must be mastered in quantitative development [what is level-2 data]
通过简单的脚本在Linux环境实现Mysql数据库的定时备份(Mysqldump命令备份)
Spring, summer, autumn and winter with Miss Zhang (4)
C # judge whether the user accesses by mobile phone or computer
【比赛网站】收集机器学习/深度学习比赛网站(持续更新)
【DL】搭建卷积神经网络用于回归预测(数据+代码详细教程)
day02作业之进程管理
Android studio login registration - source code (connect to MySQL database)








