에러 메시지는 다음과 같습니다.
ERROR 1129(00000): Host '*' is blocked because of many connection errors.
Unblock with 'mysqladmin flush-hosts'
원격 서버에서 MySQL 서버로 단순 커넥션한 뒤 close 하게 되면 MySQL은 비정상적인 접속으로 판단하여 해당 IP를 블락킹하게 됩니다.
이때 MySQL의 비정상적인 접속 요청 수를 카운트하게 되는데
global max_connect_errors 에 지정된 값을 넘기면 자동으로 블락킹 처리가 됩니다. 기본 값은 10이며 필요한 경우 이 값을 변경해야합니다.
처리 방식은 다음과 같습니다.
--max_connect_errors 카운트 확인
select @@global.max_connect_errors; - 100
--max_connections 카운트 확인
select @@global.max_connections;
--에러 카운트 초기화
flush hosts;
--max_connections 변경
set global max_connections=300;
-- max_connect_errors 변경
set global max_connect_errors=5000;