RE: [PHP] MySQL Connect Problem
| From: | Adam Voigt | Date: | Wed, 17 Mar 2004 20:16:04 +0000 |
| Subject: | RE: [PHP] MySQL Connect Problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180734@lists.php.net to get a copy of this message | ||
What does your MySQL error log say on your production database server?
It should be in the "var" directory named something ".err".
On Wed, 2004-03-17 at 15:16, Cameron B. Prince wrote:
> > Change your server address, to leave off the port number.
> >
> > Any different?
>
> $DBhost = "192.168.1.44";
> $DBuser = "web";
> $DBpwd = "user";
> $DBreg = "registration";
> $DBconf = "config";
>
> # setup database handle and load configuration data
>
> $dbh = mysql_connect($DBhost, $DBuser, $DBpwd)
> or die("Could not connect : " . mysql_error());
>
> mysql_select_db($DBconf)
> or die("Could not select database");
>
>
>
>
> Could not connect : Can't connect to MySQL server on '192.168.1.44' (2)
>
>
> Same thing... What could be wrong here... Geez, this is starting to worry
> me.
>
>
> Thanks for your help,
> Cameron
--
Adam Voigt
adam@kotisprop.com