Skip to content

조회 수 17775 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
MySQL Server가 동작중인지 원격에서 검사할 때 유의할 점이다.
원격 서버의 MySQL 3306 포트가 살아있는지 검사할 때 단순히 커넥션을 한 후 close하게 되면 MySQL은 비정상적인 접속으로 판단하여 해당 IP를 블럭킹할 수 있다.

 
# telnet 192.168.1.2 3306
Trying 192.168.1.2...
Connected to 192.168.1.2.
Escape character is '^]'.
}너무 많은 연결오류로 인하여 호스트 '192.168.1.1'는 블락되었습니다. 'mysqladmin flush-hosts'를 이용하여 블락을 해제하세요
Connection closed by foreign host.
 


MySQL은 비정상적인 접속에 대한 요청수를 카운트를 하는데 max_connect_errors 변수에서 지정한 값을 넘으면 블럭킹을 한다. 기본 값은 10이며, 정기적인 포트 점검이 필요한 경우 이 수를 높여라.

다음은 MySQL Manual에 나온 글이다.

 
A.2.5 Host 'host_name' is blocked

If you get the following error, it means that mysqld has received many connect requests from the
host 'host_name' that have been interrupted in the middle:

Host 'host_name' is blocked because of many connection errors.
Unblock with 'mysqladmin flush-hosts'

The number of interrupted connect requests allowed is determined by the value of the
max_connect_errors system variable. After max_connect_errors failed requests, mysqld assumes that
something is wrong (for example, that someone is trying to break in), and blocks the host from
further connections until you execute a mysqladmin flush-hosts command or issue a FLUSH HOSTS
statement. See section 5.2.3 Server System Variables.

By default, mysqld blocks a host after 10 connection errors. You can adjust the value by starting
the server like this:

shell> mysqld_safe --max_connect_errors=10000 &

If you get this error message for a given host, you should first verify that there isn't anything
wrong with TCP/IP connections from that host. If you are having network problems, it will do you no
good to increase the value of the max_connect_errors variable.
 


* 참고
  A.2.5 Host 'host_name' is blocked
  
http://dev.mysql.com/doc/mysql/en/Blocked_host.html

  5.2.3 Server System Variables
  
http://dev.mysql.com/doc/mysql/en/Server_system_variables.html

  1. 초기 mysql root 패스워드 설정 및 비번 변경과 root 비번 잃어 버렸을 경우 변경하는 방법

    Date2008.10.30 ByADMINPLAY Views11292
    Read More
  2. 서버에서 mysql euckr과 utf8 같이 사용하기

    Date2010.05.03 ByADMINPLAY Views12801
    Read More
  3. 리눅스를 이용한 클러스터링 구축법

    Date2009.11.19 ByADMINPLAY Views10756
    Read More
  4. 리눅스 환경에서 mySql JDBC

    Date2009.07.12 ByADMINPLAY Views10358
    Read More
  5. [우분투] mysql, data 디렉토리 변경

    Date2013.09.24 ByADMINPLAY Views15195
    Read More
  6. [데이터베이스] [DBMS-MYSQL] "SHOW PROCESSLIST"시 state 종류 및 설명

    Date2012.01.16 ByADMINPLAY Views15930
    Read More
  7. [MySQL] OPTIMIZE, TRUNCATE, 테이블복구, DB공간제한

    Date2010.05.29 Byl2zeo Views16491
    Read More
  8. [MYSQL] Mysql 테이블 검사하기 & 복구하기

    Date2009.06.17 ByADMINPLAY Views8455
    Read More
  9. [mysql] Manager of pid-file quit without updating fi[실패]

    Date2009.06.29 ByADMINPLAY Views13641
    Read More
  10. [MySQL 5.1.4] /bin/rm: cannot remove `libtoolT': No such file or directory

    Date2012.01.16 ByADMINPLAY Views18418
    Read More
  11. Starting MySQL.Manager of pid-file quit without updating fi[실패]

    Date2010.01.28 ByADMINPLAY Views19868
    Read More
  12. SSL을 이용한 MySQL 연결

    Date2009.03.03 ByADMINPLAY Views10811
    Read More
  13. slow Query 조사

    Date2009.03.17 ByADMINPLAY Views9056
    Read More
  14. skip-name-resolve

    Date2009.05.22 ByADMINPLAY Views9071
    Read More
  15. Redmine database를 복구 하고자 할 때

    Date2010.03.06 Byl2zeo Views15599
    Read More
  16. phpMyAdmin 에서 icon 과 text 중 icon 만 보이게 하기

    Date2013.01.21 Byl2zeo Views11859
    Read More
  17. PHP5와 MySQL5 연동시 한글 인코딩 문제 해결방법 (UTF-8으로의 변환)

    Date2010.03.08 Byl2zeo Views12583
    Read More
  18. mytop 으로 mysql 모니터링하기

    Date2009.06.25 ByADMINPLAY Views8736
    Read More
  19. MySQL의 호스트 블럭킹 & max_connect_errors

    Date2011.03.09 ByADMINPLAY Views17775
    Read More
  20. MySQL에서 Query Cache 사용하기

    Date2011.03.18 ByADMINPLAY Views15862
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234