[nflug] Mysql connection problem

Erek Dyskant erek at blumenthals.com
Thu Apr 10 17:14:59 EDT 2008


Deepan,
	By any chance did you compile mod_php yourself but leave the
commandline php as the distro's php?  Chances are that the myqsl socket
is somewhere other than /tmp, and for some reason your mod_php is
pulling from a different configuration file or has different default
values than your php commandline binary.
	Run phpinfo from the commandline and from a web browser, determine what
the MYSQL_SOCKET variables are in both and where the php.ini files are
located for both.  Once you figure out the discrepancy there you should
be able to figure out your problem.


Regards,
Erek


On Fri, 2008-04-11 at 02:39 +0530, 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/ 
> 
> 
> _______________________________________________
> nflug mailing list
> nflug at nflug.org
> http://www.nflug.org/mailman/listinfo/nflug



More information about the nflug mailing list