Re: mysql_select_db() problem
| From: | DL Neil | Date: | Sun, 10 Feb 2002 10:08:34 +0000 |
| Subject: | Re: mysql_select_db() problem | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-84158@lists.php.net to get a copy of this message | ||
> > What do you get if you use error checking?
>
> Well, that seems to be it, I'm getting 'Access deneid to user
> '@localhost'.....
>
> I'm talking to a guy on the mysql list, apparently it is a
> phenomememememememmemonmmm that when you GRANT ALL using wildcards it
> tends to grant all on * except localhost!
It's not so much a "phenomememememememmemonmmm" as a deliberate design feature.
On multi-user machines and network servers it is very common to have a security layer allowing tasks
to only/not
be performed on the 'system console'. For example, would you want a remote user to bring
down a mainframe with
some sort of STOP command? If you were an ISP or a DB Service Provider, would you want one user
(using only one
table, or one database) to be able to reboot the entire MySQL server (and affect all the other
users/user-tables/user-databases)?
Thus Fred@localhost is not the same privilege profile as Fred@somewhere-else to enable flexibility
in
access/security - even if Fred is the only user to ever touch the system! You have figured out by
now, that to
give Fred the same privileges on the server as from a client machine, they need to be GRANTed
'twice'.
Looking at it the other way, such 'security' controls can be either limited by the user
location, or by the name
of the user, or by both!
Regards,
=dn