Comment 1 for bug 1211654

Revision history for this message
Roman Vynar (roman-vynar) wrote : Re: ss_get_mysql_stats.php can't use socket only

Hi,

http://php.net/manual/en/mysqli.construct.php
 host
    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.

 socket
    Specifies the socket or named pipe that should be used.
        Note:
        Specifying the socket parameter will not explicitly determine the type of connection to be used when connecting to the MySQL server. How the connection is made to the MySQL database is determined by the host parameter.

If you specify the host == 'localhost', the php script should use the socket.
A hostname of 'localhost' makes it to use the local socket.