About springcloudalibaba configuration center nacos reading mysql8+ database error problem
Let me first state my own operation
nacos ----------- 1.1.4
mysql ----------- 8.0.19
first step
Create the database nacos_config
import the database file nacos-mysql.sql, the file is located in the conf under the nacos directory
effect:
The second step:
First modify the application.properties in the conf directory
Add 8+ at the end of the file,
be sure to pay attention to serverTimezone=GMT%2b8
spring.datasource.platform=mysql db.num=1 db.url.0=jdbc:mysql://localhost:3306/nacos_config?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2b8 db.user=root db.password=root
effect:
It stands to reason that it should be successful, but the error is reported. The
main bug is here. I can’t connect to the database. I found out after checking the information on the Internet.
Although there is no description in the 1.1.4 version, I found that nacos does not support mysql8.0 after consulting the subsequent versions. There is no mention of fixes in the version . The second proof is here. Unzip the source code package and find
nacos branch supported versions 5+, refer to someone else blog say, is to add a directory / plugins / mysql under nacos, and mysql folder to add jar version with its own database corresponding to
this long-winded one, how to view your mysql version
in Log in to your own mysql from the command line mysql -u[your user name] -p[your password]
I don’t think there is any problem at this point, but the reality is very cruel
emmmmmmmm, is there something wrong with my configuration file? After repeating step one and step two several times, there is no problem after careful checking. There is no problem if you have a simple Java code verification (a little mentality)
With the wrong principle, I went to the official website to download the current stable version 2.0.1 repeat step one, step two after
It's a bit eyebrow, after all, the exception is different (in fact, it is only the last step from success), I checked the information again and found that I need to start with parameters on the command line
startup.cmd -m standalone
Open cmd in the current directory
Visit again to open the web interface of nacos
At this point, my problem was solved. I didn’t face the 1.1.4 version and switched to a higher version to try metaphysics, but the facts proved successful. My 1.1.4 version is still buggy, but it does not affect my study. This is the end of my sharing. If there are errors, I hope to correct them. If there are deficiencies, I hope to leave a comment.