1. 问题:服务启动时,日志报错,导致启动失败:

Caused by: com.mysql.cj.exceptions.CJException: null,  message from server: "Host 'ip' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

 

 

 2. 解决:

(1)如果mysql 在当前机器,使用 mysql -u 用户名 -p  输入密码登录mysql

 (2)  如果mysql 不在当前机器,使用 mysql -h 主机地址 -u 用户名 -p 用户密码

 (3)  执行:flush hosts;

 

ok

 

posted on 2021-09-06 16:33  文泽9527  阅读(727)  评论(0编辑  收藏  举报