Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2000112

Re: [PHP-DB] /var/run/mysqld/mysqld.sock From: Rasmus Lerdorf (rasmus <email protected>)
Date: 11/26/00

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 <email protected>
> For additional commands, e-mail: php-db-help <email protected>
> To contact the list administrators, e-mail: php-list-admin <email protected>
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>