[ILUG-BOM] WindowXp PHP MySQL Connectivity Problem

Binand Sethumadhavan binand at gmail.com
Wed Feb 2 18:32:02 IST 2011


2011/1/20  <pankaj at glug4muz.org>:
> Hi all,
>  On one of my Windows XP system I am unable to connect to mysql from php
> script. I am able to login to mysql server from the command line as well
> as mysql console provided by WAMP 2.0 but from php script mysql_connect()
> function is always failing. I have tested WAMP 2.0 and three versions of

How about some additional details like exact command line/PHP code snippet etc?

Usually this is a grant issue. Try:

GRANT SELECT ON mydatabase.* TO 'phpuser'@'phpserverip' IDENTIFIED BY
'phppassword';

and then in PHP:

mysql_connect($server, "phpuser", "phppassword");

Binand


More information about the Linuxers mailing list