RE: Connecting to DB on separate server?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

You need to pinpoint where the break in communication is.

Does php connect ok to a database on the local machine?
no -> php or local MySql config problem?
yes -> can you ping the database server from the php server?
   no -> network problem
   yes ->MySql problem
        ->is MySql running
           no -> start it :)
           yes -> have you run a GRANT statement that allows access to the
database from the php server?

If none of the above gives any answers contact me offlist and I will run
through some diagnostics with you

HTH

Peter

-----------------------------------------------
Excellence in internet and open source software
-----------------------------------------------
Sunmaia
Birmingham
UK
www.sunmaia.net
tel. 0121-242-1473
International +44-121-242-1473
-----------------------------------------------

-----Original Message-----
From: Cassy M Rowe [mailto:cassy@cassyrowe.com]
Sent: 04 November 2002 04:27
To: php-db@lists.php.net
Subject:  Connecting to DB on separate server?


I have a php page on server #1 trying to access a database on server 
#2.  What do I put in the following blanks:

$hostname: ___________ (have tried IP, http, localhost, nothing works)
$username: blah
$password: blah
$database: _____________

$link=mysql_connect($hostname, $user, $pass) or die("Failure to 
communicate with database");

$close=mysql_select_db($database, $link);



All I get is the "Failure to communicate....."  message.

Server #1: ellerweb.eller.arizona.edu
Server #2: datamonster.sbs.arizona.edu
$database is cassy, but do I need to add anything to that?

I've tried asking two people who are really good at this and they have 
no answers.

THANK YOU IN ADVANCE!

Cassy Rowe


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux