Hi,
No...
You have applied TABLE level GRANT PRIVILEGES and tried to REVOKE that with
COLUMN PRIVILEGES. Hence the error.
To Fix it, apply column privileges ---
mysql> GRANT SELECT(hide_this) ON the_base.t100 to 'a_user'@'localhost'
identified by 'a_passwd';
mysql> select * from information_schema.column_privileges;
mysql> REVOKE SELECT(hide_this) ON the_base.t100 from 'a_user'@'localhost'
identified by 'a_passwd';
Note: Always TABLE PRIVILEGES override COLUMN PRIVILEGES
Thanks
ViSolve DB Team
----- Original Message -----
From: "Gilles MISSONNIER" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Tuesday, February 06, 2007 11:05 PM
Subject: revoke SELECT on a column [ MySQL 4.1 ]
Hello,
In a table [say t100], having 100 columns,
I want to allow the select on all columns but 1.
I tried to do this by granting all columns in the table t100, of the base,
then revoke SELECT on the column "hide_this",
but this doesn't work.
mysql> GRANT SELECT ON the_base.t100 to 'a_user'@'localhost'
identified by 'a_passwd';
mysql> revoke SELECT (hide_this) on the_base.t100 from
'a_user'@'localhost';
ERROR 1147 (42000): There is no such grant defined for user 'a_user' on
host 'localhost' on table 'current'
Is there a turn around, or should grant the select on the 99 other columns
?
regards,
_-¯-_-¯-_-¯-_-¯-_
Gilles Missonnier
IAP - [EMAIL PROTECTED]
01 44 32 81 36
--------------------------------------------------------------------------------
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]