Re: Having problems with REVOKE
| From: | Steve Werby | Date: | Sun, 12 Aug 2001 04:21:15 +0000 |
| Subject: | Re: Having problems with REVOKE | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-62289@lists.php.net to get a copy of this message | ||
"Richard Kurth" <rkurth@pacifier.com> wrote:
<snip>
> I am having problems with the Revoke statement. I add a database and
> give the user privileges with this Grant statement
</snip>
Richard,
This is not a PHP issue at all. You are aware of the MySQL mailing list
aren't you?
List-Subscribe: <mailto:mysql-subscribe@lists.mysql.com>
> The manual does not go into REVOKE as much as it does for GRANT so
> what am I missing hear.
> also I realize that the revoke statement does not remove the info from
> the db table or the usr table. How do I go about that without
> debiting a user for a different database.
I'm not sure what you're getting at, but if you want to remove a user you
can always use a DELETE statement on the user and db tables (and wherever
else is necessary), then issue a FLUSH PRIVILEGES.
> On the db table it is easy
> because I can do it were usr = $user and db = $db but in the usr table
> every host name is localhost and the password is encrypted is there a
> way to do somthing like were user =$username and password
> =$password(encrypted).
</snip>
If you have the unencrypted password you can. I think that's what your
'password=$password(encrypted)' meant after realizing it wasn't [hopefully]
meant to be PHP or SQL. WHERE user = 'user_here' AND password =
PASSWORD('password_here'). But why would you need to do that? Why not just
WHERE user = 'user_here'? After all, if all the hosts are set to localhost
there should only be one record per user in the user table.
> Yes I could go there manually. and remove it but this is being done by a
> program in PHP that will remove the database revoke the privileges and
> reset all of the info in a customers information database
Hopefully I've answered your questions. If not please post to the MySQL
list instead of here as a courtesy to the rest of the list members and
yourself (since it's the right tool for the job).
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/