Codebreaker 2bc08752a0894eb2c7afb345286e391d

4Dec/050

MySQL 원격 접속이 안될 때

잡설은 생략하고-

# netstat -na | grep 3306
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 127.0.0.1:3306      0.0.0.0:*               LISTEN

127.0.0.1:3306 이 열려있는것을 볼 수 있다. 이런 상태로는 원격 접속이 불가능하다. 2003번 에러메세지 (Can't connect to MySQL server on '%s' (%d)) 가 뜨는 것을 볼 수 있을것이다.

해결 방법은 - my.cnf 파일을 수정해주면 된다. mysqld 섹션을 보면 bind-address라는 설정 항목이 있다.

bind-address = 61.250.92.162

이렇게 수정해준다.

다시 netstat 로 확인해보면

# netstat -na | grep 3306
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State
tcp        0      0 61.250.92.162:3306      0.0.0.0:*               LISTEN

이제 원격 접속 잘 된다 :)

Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.