mysqli::__construct ([ string $host = ini_get("mysqli.default_host") [, string $username = ini_get("mysqli.default_user") [, string $passwd = ini_get("mysqli.default_pw") [, string $dbname = "" [, int $port = ini_get("mysqli.default_port") [, string $socket = ini_get("mysqli.default_socket") ]]]]]] ) 

What does this mean?:

  string $socket = ini_get("mysqli.default_socket") 

What exactly is a socket?

    1 answer 1

    File socket This is a term from Unix-like systems (pipe for Windows). In short, the connection is not through the network equipment, but through the file system. In this case, only local connection is possible.

    • but what is it for then? and this attribute is mandatory? - user33274
    • In order to avoid misunderstandings, I’ll clarify that “through the file system” only the connection occurs, and the data itself is transferred in a normal way, not through a file system) - andreymal
    • I see, thanks - user33274
    • @andreymal, what is your understanding of "normal"? Network interfaces are not used. Interfaces of a falovy system are used. - Nikola Tesla
    • @NikolaTesla in a normal way is through RAM (“kernel memory buffers” © wikipedia ), and not through a hard disk, as those who read the answer inattentively can mistakenly think andreymal