运行项目时,在登录页面输入账号密码后,控制台报数据库错误,排查了好久发现数据库的账号密码写错了,改正后就可以了。

之后又报数据库初始化错误:

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

再运行就可以了,没有报错。不过还是没有找到原因。

版权声明:本文为dqccc原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://www.cnblogs.com/dqccc/p/12539165.html