Mysql connection problem

William Attwood wattwood at gmail.com
Thu Apr 10 15:12:41 MDT 2008


When you're at the command line you are using php-cgi (php5-cgi) to execute,
which uses a different (sometimes) php.ini file.  do a phpinfo(); from
command line (phpinfo(); then grep -i .ini)

Also make sure your user account has permission to connect to mysql from
localhost.

-Will

On Thu, Apr 10, 2008 at 3: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
> Deepan
> Sudoku Solver: http://www.sudoku-solver.net/
>
>
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>



More information about the PLUG mailing list