Privileges

Privileges

am 30.08.2006 16:55:09 von m6s

I would like to ask , if I can restrict a user from a single table.
I want him to be able to create,alter,delete all the tables but one, which
I want him not to delete it, not to update it not to create it.Just to use
it.

Can I do it?

As long as I have read there is only the way to give credentials for all
the objects of the database.

Re: Privileges

am 01.09.2006 15:45:38 von Michael Austin

D. Mexis wrote:

> I would like to ask , if I can restrict a user from a single table.
> I want him to be able to create,alter,delete all the tables but one, which
> I want him not to delete it, not to update it not to create it.Just to use
> it.
>
> Can I do it?
>
> As long as I have read there is only the way to give credentials for all
> the objects of the database.



revoke all privileges on db.tablename from user [,user2,...];
grant select on db.tablename to user[,user2,...];

user = 'username'@'localhost'

Now he will only be able to "read" this table.

--
Michael Austin.