[Ilugc] mysql-php server access denied

  • From: suresh1876@xxxxxxxxx (Suresh Kumar)
  • Date: Fri Jun 27 17:18:13 2008

Hi
 i have 2 linux servers, both of them are suse linux
 in one server (server-1 -192.168.1.227 ) i have the php-apache files
and in the second server (server-2  192.8.200) i have the mysql server

when i try connecting the mysql server on server-2 ( 192.168.8.200)  from my
server-1 (192.168.1.227)
i get the following error

*Warning: mysql_connect(): Can't connect to MySQL server on '192.168.8.200'
(4) in /srv/www/htdocs/../../dbtest.php on line 5 Not able to connect
Error Can't connect to MySQL server on '192.168.8.200' (4)Cannot select DB!*

the code in dbtest.php is (the username password for mysql db is root/"")


$dbconnect =mysql_connect("192.168.8.200", "root", "");
    if ($dbconnect)
    {
     echo "Connected Sucessfully <br>";
    }
    else
    {
    echo "Not able to connect<br>";
    echo "Error ".mysql_error();
    }

Can anyone help me in solving this issue..?

-- 
with regards

J Suresh Kumar
99400 95614

Other related posts: