Re: Connecting to DB on separate server?
| From: | Bob Lockie | Date: | Mon, 04 Nov 2002 04:35:25 +0000 |
| Subject: | Re: Connecting to DB on separate server? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-22949@lists.php.net to get a copy of this message | ||
Cassy M Rowe wrote:
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 RoweMaybe you have to specify the port of the database on the remote machine. Maybe the MySQL daemon is not running? -- ---------------------------------------- From Mozilla and GNU/Linux