april breeze

another web programmer

photo gallery

localhost in MySQL

MySQL에서 localhost는 socket file을 이용한 연결을 의미함. TCP/IP 안씀.
그래서, skip-name-resolve 옵션 사용한 경우, host가 localhost로 지정된 user는로 접속이 안됨. 그리고, local에서만 접속하는 경우 skip-networking 사용하면 TCP/IP 연결을 아예 사용하지 않음.


On Unix, MySQL programs treat the host name localhost specially, in a way that is likely different from what you expect compared to other network-based programs. For connections to localhost, MySQL programs attempt to connect to the local server by using a Unix socket file.

comments powered by Disqus