Skip Menu |

This queue is for tickets about the DBD-mysql CPAN distribution.

Report information
The Basics
Id: 14942
Status: resolved
Worked: 10 min
Priority: 0/
Queue: DBD-mysql

People
Owner: Nobody in particular
Requestors: aar [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: (no value)
Fixed in: (no value)



Subject: host=localhost switches to UNIX socket instead of TCP/IP
The POD should mention that when setting host=localhost DBD::mysql tries to connect through the mysql_sock (usually /tmp/mysql.sock) instead of TCP/IP. The solution to force TCP/IP connection is to add port number _and_ switch hostname to 127.0.0.1 or similiar. Alessandro Ranellucci
From: aar [...] cpan.org
[AAR - Wed Oct 5 10:55:18 2005]: Show quoted text
> The POD should mention that when setting host=localhost DBD::mysql > tries to connect through the mysql_sock (usually /tmp/mysql.sock) > instead of TCP/IP. The solution to force TCP/IP connection is to > add port number _and_ switch hostname to 127.0.0.1 or similiar.
This behaviour is documented in this manual page, so it's not my guess: http://dev.mysql.com/doc/mysql/en/mysql-real-connect.html Alessandro Ranellucci
Added note to documentation for DBD::mysql about needing to use 127.0.0.1 as hostname for connecting via TCP/IP to localhost. Thanks for the report. Jim Winstead MySQL Inc.