[imp] Can't connect to local MySQL server

andrew morgan morgan@orst.edu
Thu, 12 Apr 2001 14:20:15 -0700 (PDT)


On Thu, 12 Apr 2001, Camilo Amado wrote:

>
> >
> >
> > Have you sure that mysql is started?
>
> Yes it is running and i can connect from the command line. I have checked
> connecting to it with the hordemgr user and password from the command
> line, with no problems

> > > >>Warning: Can't connect to local MySQL server through socket
> > > '/tmp/mysql.sock' (111) in /usr/lib/php/db_mysql.inc on line 73

Is your mysql socket file actually "/tmp/mysql.sock"?  I've seen some
systems where it is actually "/tmp/mysql-sock".  The command line mysql
utilities will know the correct socket name to connect to, but the built
in php libraries assume it is /tmp/mysql.sock always.

There is a workaround though.  If you still want to connect locally
instead of over tcp/ip, you can specify your database server as
"localhost:/tmp/mysql.sock".

Hope this helps.

	Andy