First, a little background...
About a month ago, I installed Apache 2, PHP4, and MySQL on a W2K box to be used as a temporary test environment. Once I got everything working well, I decided it was time to setup a "production" server. It's the exact same setup (W2K/Apache2/PHP4/MySQL). I downloaded the files for Apache2, PHP4, and MySQL, installed everything, updated httpd.conf and moved php4ts.dll. I then ran a couple of PHP test scripts and everything seemed to be in good shape
Now, my question:
I copied the MySQL data directory that stored the 2 DBs I wanted to move into production into the data directory on the production server. I also moved the corresponding web files into the appropriate Apache directories.
When I load up the pages, I get the following error messages:
Warning: mysql_connect(): Can't connect to MySQL server on 'localhost' (10061) in C:\Apache\Apache2\htdocs\4ROC-NY\members.php on line 29
Warning: mysql_select_db(): supplied argument is not a valid MySQL-Link resource in C:\Apache\Apache2\htdocs\4ROC-NY\members.php on line 30
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in C:\Apache\Apache2\htdocs\4ROC-NY\members.php on line 31
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\Apache\Apache2\htdocs\4ROC-NY\members.php on line 32
No records were found!
I'm sure I'm overlooking something very basic, but I can't figure out why it won't connect. What am I missing?
Here's the PHP call:
$db = mysql_connect("localhost", "root");
mysql_select_db("4rocmembers",$db);
$result = mysql_query("SELECT * FROM members",$db);
Thanks.