这次在开发的时候,发现测试数据库总是报下面这个错误:Caused by: java.sql.SQLException: null, message from server: "Host 'SJSWT46-147.opi.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"。发现重启数据库也没有用。网上查了个方法,说是只能解决表面问题,不过在我看来够用了。就是设置最大的错误连接数,
set global max_connect_errors = 10000;
![](/attachment/201505/29/23846475_1432879294RReN.png)
后来我看了线上的这个参数的设置,是1000000。呵呵了。默认值是10。
阅读(255) | 评论(0) | 转发(0) |