This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Crash of mysql under cygwin with g++ 3.3.1


Fabrice Marchal wrote:

> "cannot connect through /var/mysql/mysql.sock". The workaround is
> to use mysql_real_connect with host=127.0.0.1 because if I use
> "localhost" it turns to named pipes instead of using TCP. Any idea why it
> is that way?

Because Unix domain sockets are more efficient than TCP/IP ones.  So if
you specify 'localhost' as the host then there's a prety good chance
that a Unix socket is available, and so the client tries that.  It's an
optimization so that Unix sockets are used when talking to the
localhost, without the user having to explicitly configure it.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]