Re: Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock

From: Date: Mon, 20 Dec 2004 16:38:15 +0000
Subject: Re: Re: PHP 5 MySql 4.1 issue - can't connect to mysql.sock
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-204719@lists.php.net to get a copy of this message
Bingo. Many thanks. > Barley wrote: > > > If I run the script from a shell prompt as root, it outputs "Yes". If I run > > as any other user, it outputs "No." It also gives this error: > > Warning: mysqli_connect(): Can't connect to local MySQL server through > > socket '/var/lib/mysql/mysql.sock' (13) > > Check permissions on /var/lib/mysql. From the sockets manpage: > > NOTES > In the Linux implementation, sockets which are visible in the filesystem > honour the permissions of the directory they are in. Their owner, group > and their permissions can be changed. Creation of a new socket will fail > if the process does not have write and search (execute) permission on > the directory the socket is created in. Connecting to the socket object > requires read/write permission. This behavior differs from many > BSD-derived systems which ignore permissions for Unix sockets. Portable > programs should not rely on this feature for security. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#204719) next »