当前位置:网站首页>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 :

边栏推荐
- 【DL】关于tensor(张量)的介绍和理解
- [network design] convnext:a convnet for the 2020s
- [database] database course design - vaccination database
- 研究生新生培训第三周:ResNet+ResNeXt
- 【语义分割】语义分割综述
- Briefly talk about the difference between pendingintent and intent
- File permissions of day02 operation
- Research on the implementation principle of reentrantlock in concurrent programming learning notes
- Reporting service 2016 custom authentication
- Thinkphp6 output QR code image format to solve the conflict with debug
猜你喜欢

电脑视频暂停再继续,声音突然变大

研究生新生培训第一周:深度学习和pytorch基础

Process management of day02 operation

Briefly talk about the difference between pendingintent and intent

【Transformer】AdaViT: Adaptive Tokens for Efficient Vision Transformer

Flink, the mainstream real-time stream processing computing framework, is the first experience.

Is flutter being quietly abandoned? On the future of flutter

虚假新闻检测论文阅读(五):A Semi-supervised Learning Method for Fake News Detection in Social Media

【DL】关于tensor(张量)的介绍和理解

【Transformer】AdaViT: Adaptive Vision Transformers for Efficient Image Recognition
随机推荐
并发编程学习笔记 之 工具类CountDownLatch、CyclicBarrier详解
anaconda中移除旧环境、增加新环境、查看环境、安装库、清理缓存等操作命令
【比赛网站】收集机器学习/深度学习比赛网站(持续更新)
Ribbon learning notes 1
【目标检测】KL-Loss:Bounding Box Regression with Uncertainty for Accurate Object Detection
【CV】请问卷积核(滤波器)3*3、5*5、7*7、11*11 都是具体什么数?
Briefly talk about the difference between pendingintent and intent
[overview] image classification network
【Transformer】TransMix: Attend to Mix for Vision Transformers
【Transformer】TransMix: Attend to Mix for Vision Transformers
Spring, summer, autumn and winter with Miss Zhang (2)
IDEA中设置自动build-改动代码,不用重启工程,刷新页面即可
The difference between asyncawait and promise
Most PHP programmers don't understand how to deploy safe code
Activity交互问题,你确定都知道?
[clustmaps] visitor statistics
并发编程学习笔记 之 ReentrantLock实现原理的探究
【Transformer】AdaViT: Adaptive Vision Transformers for Efficient Image Recognition
How does PHP generate QR code?
并发编程学习笔记 之 工具类Semaphore(信号量)