본문 바로가기
[DataBase]/MySql

Unblock with 'mysqladmin flush-hosts'

by control+c 2018. 2. 19.
반응형

ERROR 1129 (00000): Host 'xx' is blocked because of many connection errors. Unblock with 'mysqladmin flush-hosts'

mysql에서 원격지의 IP를 블락시켰다는 내용

- 원격 서버의 MySQL 3306 포트가 살아있는지 검사할 때 단순히 커넥션을 한 후 close하게 되면MySQL은 비정상적인 접속으로 판단하여 해당 IP를 블럭킹할 수 있다.

mysql이 아닌 리눅스에서 

$mysqladmin flush-hosts -uroot -p

Enter password:*****

이렇게 로그인해주면 해결됨.

추가로

비정상적인 접속에 대한 요청을 카운트를 하는데 max_connect_errors 변수에서 지정한 값을 넘으면 블럭킹을 한다. max_connect_errors를 높게 하면 해당 에러를 늦추거나 없앨수 있다.


max_connect_errors 확인 
- show variables like '%max_connect%';

max_connect_errors 수정 
- shell> mysqld_safe --max_connect_errors=10000 &
- mysql> SET GLOBAL max_connect_errors=10000;


반응형

댓글