FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > PHP, Perl, Python and/or MySQL
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 06-11-2002, 10:41 PM   Postid: 69377
manu
Visitor

Forum Notability:
0 pts:
[Post Feedback]
 
Join Date: Feb 2002
Posts: 25
Unable to connect to Mysql from php script.

Dear All,
I hv a small problem and i really hope you guys can help me out. Ok here i go:

Initially i had my web server and mysql server located locally(ip 202.157.188.2), and i used the following code to connect without any problem :

$dbhost = "localhost";
$dbname = "testdb";
$dbuser = "testuser";
$dbpassword = "testpwd";
$db = mysql_connect($dbhost, $dbuser, $dbpassword);
if(!$db)
{
echo"Could not connect to database";
exit;
}

now my web server is located at 202.157.137.97 and mysql server at 202.157.188.2 i tried connecting to mysql using :

$dbhost = "202.157.188.2"; instead of localhost

but i'm getting this error msg :
MySQL Connection Failed: Can't connect to MySQL server on '202.157.188.2' (61)

does it mean tht the way i'm trying to connect is wrong ?

i hv a host in mysql user table as 202.157.188.2 with all grants .

please help me out.
thank you very much.

manu
manu is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 06:24 PM.


Running on vBulletin®
Copyright © 2000 - 2013, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2013 FutureQuest, Inc.
FutureQuest, Inc.