On Thursday 16 September 2004 10:53, Sam Hobbs wrote:
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > 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.

<sigh> Whether it is bug or not, whether it is supposed to be a problem or 
not, the fact is that the firewall was interfering with your ability to 
connect to mysql.

> > 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.

I'm not familiar with MySQL under Windows, but I believe that there are 
different installers available from various sources. So saying "Typical" 
installation option doesn't really mean much.

> Oh, now I understand better. Sorry. The username "admin" confused me, but I
> should have known.

I didn't say "the username admin", I said the "admin user".

> There is a slight chance I used a different host than "localhost". 

[quote from another Sam HObbs post]
> However I also believe in being methodical and in verifying assumptions. It
> does help to eliminate possilities.
[end quote]

I would've thought that being methodical implied meticulous noting of cause 
and effect.

Using anything other than localhost/127.0.0.1 would almost certainly make you 
hit the firewall.

Note also that for troubleshooting it's probably better to use 127.0.0.1 
rather than localhost. The latter is subject to your system's "dns resolution 
mechanism" and also to the mysql client library's interpretation.

> 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");
[...]

I would suggest that you use the above code to do the following combination of 
tests:

1) With ZoneAlarm enabled and with it disabled (yes disabled completely, if 
you're worried disconnect from the internet and any other networks)

2) With $location='localhost' and $location='127.0.0.1'

3) With $username='root' and $username='somenormaluser'

That's a total of 12 tests if you're following.

If when you have ZoneAlarm enabled and you can connect with one user and not 
with another (I believe you came across this is a previous post) then show us 
following:

The following should be performed on the 'mysql' database (ie the system 
database which holds all the user related info):


select * from user where User='user_that_can_connect';
select * from db where User='user_that_can_connect';

select * from user where User='user_that_cannot_connect';
select * from db where User='user_that_cannot_connect';

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
Disc space -- the final frontier!
*/

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

Reply via email to