PDA

View Full Version : Connectivity dropped


h8ids
09-26-2006, 06:20 PM
Updated all pages. Specifically the PHP database connection code.

Swapping $db = mysql_connect("localhost", "root", "");

to

$db = mysql_connect("system IP", "root", "");

Tested the pages and now they are refusing to connect to the database.

Looked in the MySQL administrator; didn't notice any setting that wouldn't allow a page to connect by specific IP address.

Using MySQL 4.1 and Administrator 1.2.3 rc

The development machine and test machine are the same.

Fumigator
09-26-2006, 06:48 PM
Did you include the port number with the ip?

p.s. you actually changed more than one page before testing to see if it actually works? Gluton for punishment I see :D

h8ids
09-26-2006, 07:02 PM
Include the port number with the IP... something like this?
$db = mysql_connect("system IP", "port number", "root", "");


p.s. you actually changed more than one page before testing to see if it actually works? Gluton for punishment I see

Didn't think that it would be such a big problem.
:rolleyes:

Fumigator
09-26-2006, 08:10 PM
I RFTM for you, here's the copy/paste:

server

The MySQL server. It can also include a port number. e.g. "hostname:port" or a path to a local socket e.g. ":/path/to/socket" for the localhost.

If the PHP directive mysql.default_host is undefined (default), then the default value is 'localhost:3306'

http://us3.php.net/manual/en/function.mysql-connect.php

h8ids
09-27-2006, 04:51 PM
Got it.:thumbsup: thanks.