Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mysql 如果数据库端口错误(数据库服务器不可用或关闭),则应启动Spring引导_Mysql_Spring - Fatal编程技术网

Mysql 如果数据库端口错误(数据库服务器不可用或关闭),则应启动Spring引导

Mysql 如果数据库端口错误(数据库服务器不可用或关闭),则应启动Spring引导,mysql,spring,Mysql,Spring,我有spring boot应用程序,作为我的应用程序的一部分,我有mysql数据库。有时我忘记打开mysql端口,因此我的应用程序无法启动 com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not receiv

我有spring boot应用程序,作为我的应用程序的一部分,我有mysql数据库。有时我忘记打开mysql端口,因此我的应用程序无法启动

com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure

The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
    at com.mysql.cj.jdbc.exceptions.SQLError.createCommunicationsException(SQLError.java:590)

它应该以警告消息开头,提前感谢。

的可能重复即使您成功地启动它而没有任何错误,但在执行实际请求时,它也会失败。我宁愿让它在启动时失败,也不愿在运行时失败。