when I am using ‘localhost’ as the host for MySQL database, sequel pro alert me that I will be using socket. On the other hand, if I use ‘127.0.0.1’, i would be using the ip address and port 3306 to reach the server.
What is the difference?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A Unix socket is a data communications endpoint that is similar to an network socket, but does not use a network protocol for communication. These are used in POSIX operating systems for inter-process communication. (Source)
The “localhost -> socket” rule appears to be hardcoded in the MySQL client library, according to a forum post by a MySQL developer. (Source)