RE: [PHP] PHP installed - MySql Server can't connect

From: Date: Fri, 13 Jul 2001 06:00:30 +0000
Subject: RE: [PHP] PHP installed - MySql Server can't connect
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57686@lists.php.net to get a copy of this message
Right, that is basically what I said. On Fri, 13 Jul 2001, Matthew Loff wrote: > > Maybe his mysql.sock file isn't in /var/lib/mysql/mysql.sock? > > Mine is /tmp/mysql.sock > > > -----Original Message----- > From: Rasmus Lerdorf [mailto:rasmus@php.net] > Sent: Friday, July 13, 2001 1:31 AM > To: Gaylen Fraley > Cc: php-general@lists.php.net > Subject: Re: [PHP] PHP installed - MySql Server can't connect > > > 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.* > > -Rasmus > > > 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! > > > > -- > > Gaylen > > gfraley5@earthlink.net > > > > > > > > > > > > >

« previous php.general (#57686) next »