stephanediondev / readerself

Replaced by a new version
https://github.com/stephanediondev/feed
Other
158 stars 26 forks source link

Database connection via socket #70

Open afritsch opened 9 years ago

afritsch commented 9 years ago

I just downloaded readerself and tried to connect to my database through a socket and got an error. Is it possible at all to connect through an socket? socket

stephanediondev commented 9 years ago

you can try with empty hostname or "localhost"

http://php.net/manual/en/mysqli.construct.php "Can be either a host name or an IP address. Passing the NULL value or the string "localhost" to this parameter, the local host is assumed. When possible, pipes will be used instead of the TCP/IP protocol."

afritsch commented 9 years ago

Both leaving it empty or entering "localhost" will establish a local connection via tcp/ip. This is not what I want, that's why I entered the socket path (note the colon at the beginning). I think the problem is that something tries to append the standard mysql port to the socket path. A socket does not have a port. See the last line in my screenshot.