[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] [RaQ4] php + mysql



"Benoit Sarton" <bs@xxxxxx> writes:

> >Anyone know what might be wrong here?  Do I need to do something to PHP to
> >make it recognize MySQL?

> In my case I had to say that mysql.sock is not in /tmp/mysql.sock , ( as it seems it usually is ) ,
> but in /var/lib/mysql/mysql.sock
> So I changed my php code to explicitly :
> mysql_connect("localhost::/var/lib/mysql/mysql.sock",$user,$pass);

A more all-round solution is to issue this telnet command as root:

        ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock

That way, you do not have to alter all your php-scripts.

-- 
Jens Kristian Søgaard, Mermaid Consulting I/S,
jens@xxxxxxxxxxxxxxxxxxxx,
http://www.mermaidconsulting.com/