I think you've just answered your own question here:

"I get a "Can't Connect to MySQL Server" error.  I am not sure if it is
localhost, since my webserver is on a different machine with a different
name.  The MySQL installation is on a different machine, separate from
the web server with its own machine name."

Your mysql_connect call should be to the ip address or hostname of the
machine running mysqld.

Make sure that mysql is configured to allow user "test" to connect from
the machine you're connecting from. Also, make sure that mysql is
configured to accept network connections. Finally, make sure that any
firewalls you have between the machines allow tcp/ip traffic on port
3306.

Ian

On Thu, 2004-03-04 at 22:38, [EMAIL PROTECTED] wrote:
> Hi There,
> 
> I'm trying to establish a first time connection to MySQL running on Win
> 2000.  I have loaded the application and have entered a user name and
> password.  The code that I am entering to establish a connection is:
> 
> <?php
> $conn=mysql_connect("localhost", "test", "test");
> Echo $conn;
> ?>
> 
> I get a "Can't Connect to MySQL Server" error.  I am not sure if it is
> localhost, since my webserver is on a different machine with a different
> name.  The MySQL installation is on a different machine, separate from the
> web server with its own machine name.
> 
> I looked at the my.ini file and the username and password paramaters match.
> Also, the MySQL admin is showing the host info as localhost via TCP/IP.  The
> version is 1.4
> 
> The Start Check is showing a yes for an ini file, Ok for MySQL server path
> key, datadir, and basedir.
> 
> Any assistance from you would be greatly appreciated.
> 
> Thanks,
> 
> Shawn
> 
> 
> 
> 

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

Reply via email to