Mysql connection problem

Coleman Kane cokane at cokane.org
Thu Apr 10 17:14:02 EDT 2008


Deepan 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 
> Deepan 
> Sudoku Solver: http://www.sudoku-solver.net/ 
>   
The web server is going to be using a different user than the 
command-line is. What user are you using on the command line to test? 
You may need to change the socket so that it is group-readable and then 
put the web-server user into that group (and re-start the web server).

It would be helpful if you sent over the output of the following command:
ls -l /tmp/mysql.sock

--
Coleman Kane



More information about the gnhlug-discuss mailing list