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.
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.