Deploy the ssm project to the pits encountered by the cloud server

There are some problems when deploying an ssm project these days

First, it can be successful to connect to the remote server database locally, but it is not successful to access it locally.
Possible reasons are caused by inconsistent versions
That is, the local jdk is inconsistent with the version on the server. Here I use the project written by jdk9 locally, but the jdk on my server is version 8.
At this time, I download jdk9 from the Internet and delete 8.
Download and install refer to my blog
. Install jdk8 under Linux cloud server. rpm
can be accessed at this time servlet
Here we should pay attention to restart Tomcat

[root@VM-0-16-centos bin]# ./startup.sh 

But the next pit came out and the server couldn't connect to the remote database.
The reasons are summarized as follows:
1.Security group opens port 3306
2.The firewall is not turned on 3306
Refer to my blog below
to open firewall port
3 in the linux cloud server .Restart nysql
The restart mysql command is as follows

systemctl restart mysqld 

Summarize the pits encountered:

1. The version must be the same, and the environment must be the same
2. After the configuration is complete, you must restart Tomcat mysql, etc.

Guess you like

Origin blog.csdn.net/he1234555/article/details/114594515