Re: Re: mysql_connect does not connect
| From: | Sam Hobbs | Date: | Thu, 16 Sep 2004 02:53:14 +0000 |
| Subject: | Re: Re: mysql_connect does not connect | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196809@lists.php.net to get a copy of this message | ||
"Jason Wong" <php-general@gremlins.biz> wrote in message
news:200409160631.08335.php-general@gremlins.biz...
>
> So now are you fully convinced it's your firewall that's the root of your
> problem?
No, not really. At the moment I am assuming it is a bug in something
somewhere. The versions of php and MySQL that I am using are not fully
tested. Therefore it is entirely possible that the problem I had is not
supposed to be a problem.
> 1) How are you connecting using mysql_connect()? Do you use IP addresses
> or
> hostnames?
> 2) What are your exact connection parameters when connecting as an "admin
> user"?
> 3) What are your exact connection parameters when connecting as an "normal
> user"?
I am not sure how to determine these things, except to say that I am using
MySQL as it was installed by the "Typical" installation option.
Oh, now I understand better. Sorry. The username "admin" confused me, but I
should have known.
There is a slight chance I used a different host than "localhost". So to be
absolutely sure, I will do the tests again when I make a fomal bug report,
assuming that a bug report is needed. Other than that, I used the following
for both my Administrator and my non-Administrator accounts:
<?php
$location = "localhost";
$username = "root";
$password = "";
$database = "mysql";
$conn = mysql_connect($location, $username, $password);
if (!$conn) die ("<p>Could not connect to MySQL using $location, $username,
$password</p>\n");
print "<p>Connected to MySQL using $location, $username, $password</p>\n";
mysql_select_db($database, $conn) or die ("<p>Could not open
database</p>\n");
print "<p>Database $database selected.</p>\n";
?>