Mysql connection problem

Thomas Charron twaffle at gmail.com
Thu Apr 10 17:42:23 EDT 2008


On Thu, Apr 10, 2008 at 5:09 PM, Deepan <codeshepherd at gmail.com> wrote:
> Hi All,
>  I am able to connect to Mysql via command line
>  using mysql client. I am also able to connect to
>  mysql via php if I run those php programs via
>  command line. However when I hit those php pages
>  via the browser it throws the error Can't connect
>  to local MySQL server through socket
>  '/tmp/mysql.sock' (2). Please note that this is
>  the same socket the mysql client tries to connect
>  to the server.
>  Regards

  Can you run them as the user the apache web server is running as?
Since you've said you can run the php from the command line, I'm
assuming it has to do with the user authority of some type.  If the
system is really, REALLY locked down, the user apache runs as may not
be able to open /tmp/mysql.sock.

-- 
-- Thomas


More information about the gnhlug-discuss mailing list