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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux