reasonThe mysql version that nacos's pom depends on is inconsistent with the mysql version. Step 1:Modify the mysql version dependency in the pom file <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.19</version> </dependency> Step 2: Building project solves compilation errors (delete old dependencies) Step 3:Repackage mvn -Prelease-nacos -Dmaven.test.skip=true clean install -U Add mysql configuration location Solve the problem that Nacos cannot connect to Mysql8.0+ Nacos 0.7 version added support for MySQL data source function, and the configuration of the Nacos cluster can be persisted to MySQL. If the system prompts that the database cannot be connected, check the configured database connection to make sure it is correct. spring.datasource.platform=mysql db.num=1 db.url.0=jdbc:mysql://localhost:3306/nacos_config?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC db.user=root db.password=123456 Solution: Create a new plugins/mysql folder in the nacos installation directory, put the 8.0+ version of mysql-connector-java-8.0.xx.jar in it, and restart nacos. This is the end of this article about the solution to the problem that nacos cannot connect to mysql. For more related content about nacos cannot connect to mysql, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Zabbix combined with bat script to achieve multiple application status monitoring method
>>: CSS flex several multi-column layout
1. Install Docker. Reference URL: Docker Getting ...
1. ip_hash: ip_hash uses a source address hash al...
Preface The latest version of MySQL 8.0 is 8.0.4 ...
This article example shares the specific code of ...
1. Preparation before installation Check the data...
Abstract: This article mainly explains how to ins...
Preface Although the holiday is over, it shows up...
This article shares the installation and configur...
DOCTYPE Doctype is used to tell the browser which...
There are three ways to introduce CSS: inline sty...
Several concepts Line box: A box that wraps an in...
See the effect first Implementation Code <div ...
HTML meta viewport attribute description What is ...
The Linux stream editor is a useful way to run sc...
Background: I want to install a SAP ECC server an...