DBMS/MySQL

[MySQL] mysql 외부 접속시 connection locked 현상 (Unblock with 'mysqladmin flush-hosts

antoroong 2025. 2. 17. 21:49

갑자기 이런 오류로 접속이 안되고 있다

 

 

 

증상.
원격 서버에서 Mysql Server 로 단순 커넥션 한 뒤 close 하게 되면
Mysql 은 비정상적인 접속으로 판단하여 해당 IP를 블럭킹하게 된다.

이때 mysql의 비정상적인 접속 요청수를 카운트 하는데
global max_connect_errors 에 지정된 값을 넘기면 자동 블럭킹처리 됨
기본값은 10이며 필요한 경우 이 값을 변경해야 한다.

 

출처:

https://sd23w.tistory.com/414

[그러냐:티스토리]

 

 

 

select @@global.max_connect_errors;

 

 

select @@global.max_connections;

 

 

flush hosts;

 

 

set global max_connections=300;

 

 

set global max_connect_errors=10000;