MySQL Connection
| From: | Shawn dot Ali at do dot treas dot gov | Date: | Thu, 04 Mar 2004 21:38:44 +0000 |
| Subject: | MySQL Connection | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-179501@lists.php.net to get a copy of this message | ||
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