The project database can be connected locally, but the connection fails when deployed to Linux

CSDN Q & A 2022-02-13 06:32:06 阅读数:397

project database connected locally connection

server.port=8082
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/indoor_pos1?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
spring.datasource.username=root
spring.datasource.password=****

# Database name
mysql.database = indoor_pos1

# When accessing this link , Through the static resource path The method of resource mapping is configurer/MyWebAppConfigurer For pictures only
tomcat.virtual.path=/upload/virtual/

file.upload.url=/indoorpoi/upload/
head.url=http://172.17.121.33:8082/partyhistory

mybatis.mapper-locations=classpath:mappers/*.xml

spring.jackson.default-property-inclusion=NON_NULL
project.address.max-count=20

server.tomcat.max-http-post-size = -1

spring.servlet.multipart.enabled=true
spring.servlet.multipart.file-size-threshold=0
spring.servlet.multipart.max-file-size=100MB
spring.servlet.multipart.max-request-size=200MB
spring.servlet.multipart.resolve-lazily=false

Error log -------

img

The database is linux On the server
It is also possible to start a remote connection locally with a typed package ..
So it hurts a little




Take the answer :

I found Java Installation directory D:\Java\jdk1.8.0_291\jre\lib\security Medium java.security file , The corresponding SSLv3



Other answers 2:

1、jdbc:mysql://127.0.0.1:3306
This 127.0.0.1 It's best to write it. IP, Even this machine .

2、 Yours jdbc The server where the program is located . Install mysql client , See if you can connect to the server ?


Other answers 3:

First, whether the program and database are on the same server , If not ,linux Need to open ports , If it's alicloud , There's something else to open
Make sure it's okay , Try restarting the database , Such mistake , Restart can solve 90% The problem of


Other answers 4:

I met the same problem


Other answers 5:
copyright:author[CSDN Q & A],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/02/202202130632032772.html