Re: php cli and mysql

From: Date: Tue, 14 Nov 2006 23:56:01 +0000
Subject: Re: php cli and mysql
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-244632@lists.php.net to get a copy of this message
Roman Neuhauser wrote:
# cajbecu@gmail.com / 2006-11-14 20:17:16 +0200:
On 11/14/06, James Tu <jtu@esidesign.com> wrote:
    
I'm running a php script from the command line (I'm on OS X) and I'm
getting ... Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/mysql/mysql.sock' (2)
      
touch /var/mysql/mysql.sock chmod 777 /var/mysql/mysql.sock
    
How could that possibly help? Because if the mysql.sock file is missing the mysql server won't start. If the mysql server isn't running the PHP script won't work. So I think it helps a lot.


« previous php.general (#244632) next »