Re: help with mysql connect error

From: Date: Fri, 09 Feb 2007 15:13:34 +0000
Subject: Re: help with mysql connect error
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.db 
Request: Send a blank email to php-db+get-43051@lists.php.net to get a copy of this message
Chris wrote:
Tim McGeary wrote:
Stut wrote: Ok, so I did the recommended process of: mysql> UPDATE mysql.user SET Password = OLD_PASSWORD('newpwd')
    -> WHERE Host = 'some_host' AND User = 'some_user';
mysql> FLUSH PRIVILEGES; This allows the CLI script to run successfully, but the web php file still gives me the original error. Any ideas? The error again is: Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13) in /var/www/html/software/index.php on line 18 Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (13)
'13' means permission denied. $ perror 13 System error: 13 = Permission denied What are the permissions on the /var/lib/mysql/ directory? Maybe php can't get into that, thus it can't get to the socket file. Try chmod 755 /var/lib/mysql to allow any user to be able to read files in that folder (but not change anything)...
You are correct, it was the directory permissions! Thank you so much. That is also great information about what the error numbers mean. Where or how can I find out what those numbers mean for future reference? Thanks, Tim

« previous php.db (#43051) next »