Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not create connection to database server. Attempted reconnect 3 times #38

Open
lyphia opened this issue Aug 11, 2020 · 3 comments

Comments

@lyphia
Copy link

lyphia commented Aug 11, 2020

兄弟 Could not create connection to database server. Attempted reconnect 3 times这个数据库连接为题怎么搞 你那在本地

@youlingdada
Copy link

我也遇到了这种情况,好难。。

@XYFFFFFF
Copy link

XYFFFFFF commented Jun 9, 2021

你们得检查数据库的配置文件,还有依赖的版本号

@wx528
Copy link

wx528 commented Sep 26, 2021

连接mysql 8 是会报错的

  1. pom里指定mysql-connector-java的版本 :
    8.0.11
  2. application-jdbc.properties里 com.mysql.jdbc.Driver改为 com.mysql.cj.jdbc.Driver:
    #spring.datasource.driverClassName=com.mysql.jdbc.Driver
    spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants