create connection error, url: jdbc:mysql://**ip**:3306/*?errorCode 1045, state 28000
Posted 要不要买菜
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了create connection error, url: jdbc:mysql://**ip**:3306/*?errorCode 1045, state 28000相关的知识,希望对你有一定的参考价值。
运行项目时,在登录页面输入账号密码后,控制台报数据库错误,排查了好久发现数据库的账号密码写错了,改正后就可以了。
之后又报数据库初始化错误:
1 init datasource error 2 The last packet sent successfully to the server was 0 milliseconds ago. 3 The driver has not received any packets from the server.
回来查资料,在项目的配置文件mysql.url后面添加参数
&autoReconnect=true&failOverReadOnly=false&maxReconnects=10
再运行就可以了,没有报错。不过还是没有找到原因。
以上是关于create connection error, url: jdbc:mysql://**ip**:3306/*?errorCode 1045, state 28000的主要内容,如果未能解决你的问题,请参考以下文章
redis error It was not possible to connect to the redis server(s); to create a disconnected multiple
Docker报错:An error occurred trying to connect:Post http://localhost:2375/......
Error creating bean with name ‘redisConnectionFactory‘ defined in class path resource...
Error creating bean with name ‘redisConnectionFactory‘ defined in class path resource...