Re: /var/run/mysqld/mysqld.sock

From: Date: Sun, 26 Nov 2000 23:02:05 +0000
Subject: Re: /var/run/mysqld/mysqld.sock
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4743@lists.php.net to get a copy of this message
Check the manual. You can provide the path to the socket in your mysql_connect() call. The difference happens when the MySQL client library you are using doesn't match the installed version of MySQL. -Rasmus On Sun, 26 Nov 2000, pablo wrote: > hi php-db, > > i'm trying to set up php4, mysql & apache on a debian 2.2 box. > everything seems to work ok until i try and connect to mysql via php. > then i get the following error message. > > Warning: MySQL Connection Failed: Can't connect to local MySQL server > through socket '/var/run/mysqld/mysqld.sock' (111) in common.php on line 79 > > fyi - line 79 looks like this... > $db = mysql_connect($CONF["dbhost"], $CONF["dbuser"], > $CONF["dbpass"]); > ...and is passing valid arguments. > > it seems like a pretty straight-forward error, but... > mysql is using /tmp/mysql.sock to dump the socket information. > both the 'my.cnf' file and 'mysqld variables' confirm this. > > i can't find any trace of '/var/run/mysqld/mysqld.sock' in any of the config > files for php, mysql, apache, or the startup scripts 'safe_mysqld' or > 'mysql.server' [whose defaults should be over ridden by my.cnf anyways, > right?], so i don't understand where php is getting this path from. > > any ideas? > > thanks > > pablo > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.db (#4743) next »