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
Solving the problem Bootstrap is a CSS framework ...
Table of contents Preface 1. Background 2. Simula...
Table of contents JSX environment construction In...
Docker basic instructions: Update Packages yum -y...
Table of contents 1. HttpGET 2. HTTP POST WebSock...
Introduction Use simple jQuery+CSS to create a cus...
<br />Previous tutorial: Web Design Tutorial...
PHP7 has been out for quite some time, and it is ...
Table of contents Brief description: 1. Four char...
Preface Before we begin, we should briefly unders...
Preface In the Linux operating system, device fil...
Step 1: Sign a third-party trusted SSL certificat...
Copy code The code is as follows: <thead> &...
Table of contents Tomcat class loader hierarchy W...
mysql copies the files in the data directory to r...