This happens when the mysql server you are running is different from the
version of the mysql library php was linked against. If you compiled php
using "--with-mysql" you get the mysql client library that comes bundled
with PHP which may not match your mysql server and thus may look for the
mysql.sock file in the wrong place.
To fix this, either figure out where your mysql.sock file is and specify
it directly in your mysql_connect() call (see
http://php.net/mysql_connect) or recompile PHP against your system's mysql
client library by using "--with-mysql=/usr" assuming your mysql client
library is in /usr/lib/mysqlclient.*
> PHP install went perfectly. phpinfo shows MySql installed. But, when I try
> to start Mysql, I get:
> ERROR 2002: Can't connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock' (111)
> What and why?
> Please reply to my e-mail address if you can help. Thanks!
> [EMAIL PROTECTED]
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]