1129: Host 'host' is blocked because of many connection errors (연결 오류가 많아 호스트 차단됨)
MySQL의미
클라이언트 호스트의 연속 연결 오류가 임계값(max_connect_errors)을 초과해 MySQL이 해당 호스트를 차단했다. 그때까지 실패한 handshake 때문에 호스트가 차단 목록에 올랐다.
원인
로드 밸런서/모니터링 도구가 TCP 포트에 불완전하거나 잘못된 handshake를 보내거나, 네트워크 문제로 연결이 중간에 끊기거나, 잘못 구성된 클라이언트가 실패하는 연결을 계속 시도하는 경우다. 오류 카운터가 max_connect_errors에 도달하면 호스트가 차단된다.
해결 방법
즉시 차단을 해제한다: SQL에서 TRUNCATE TABLE performance_schema.host_cache; (8.0.23+; FLUSH HOSTS는 8.0.23에서 deprecated되고 8.4에서 제거됨) 또는 명령줄에서 mysqladmin flush-hosts. 차단된 호스트 확인: SELECT host, ip, sum_connect_errors FROM performance_schema.host_cache; 근본 원인을 해결한다: 헬스 체크/모니터링 도구가 완전한 MySQL handshake를 수행하도록 구성하고 네트워크 안정성을 확인한다. 정상 환경에서는 max_connect_errors를 높여 허용치를 늘릴 수 있지만, 중요한 것은 실제 연결 오류를 해결하는 것이다.
같은 데이터베이스의 다른 항목
- 1364Field 'name' doesn't have a default value (필드에 기본값 없음)
- 1206The total number of locks exceeds the lock table size (전체 락 수가 락 테이블 크기 초과)
- 1236Got fatal error 1236 from master when reading data from binary log (binary log 읽기 중 master로부터 치명적 오류 1236 수신)
- 1194Table 'name' is marked as crashed and should be repaired (테이블이 crashed로 표시되어 복구 필요)
- 1615Prepared statement needs to be re-prepared (prepared statement 재준비 필요)
- 1553Cannot drop index needed in a foreign key constraint (외래 키 제약 조건에 필요한 인덱스 삭제 불가)
- 3948Loading local data is disabled; this must be enabled on both the client and server sides (로컬 데이터 로드가 비활성화됨. 클라이언트와 서버 양쪽에서 활성화 필요)