错误
Host is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
原因
同一个ip在短时间内产生太多中断的数据库连接而导致的阻塞(超过mysql数据库max_connection_errors的最大值);
解决
MySQL连接远程数据库因为连接时错误次数过多,而连接不上时,在远程数据库执行:
flush hosts
使用命令修改
/usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3306 -uroot -prootpwd
ps:当为本地连接时也可以将ip改成localhost