note 16676 deleted from function.mysql-connect by jimw

From: Date: Sat, 08 Dec 2001 19:49:44 +0000
Subject: note 16676 deleted from function.mysql-connect by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-22130@lists.php.net to get a copy of this message
I kept getting "Can't connect to MySQL"... If your script keeps refusing to connect to the local machine, check how MySQL is configured on your machine: Does it use sockets or IP to connect to the database? I found out the hard way that using '127.0.0.1' does not work on a machine that is configured for sockets. If it uses sockets, use hostname 'localhost'. If you connect via IP, use hostname '127.0.0.1'. If that does not help, check if cron temporarily deletes the socket from the default dir /tmp ,) Hope this helps grtz MRJB

« previous php.notes (#22130) next »