Hi All,

I have some database named DB1 and one table in it named TBL1. In TBL1
there is 3 columns: name, address, id.

There is mysql user named dbuser.

Now, I want to give to 'dbuser' privileges to read ONLY 'name' and
'address' columns from table 'TBL1'.
So, I added record to mysql.user table (with no global privileges) -
thans to thar 'dbuser' is able to connect to MySQL server, and it
works OK. Further I added records to mysql.column_privileges:

mysql> insert into columns_priv values('localhost','DB1','dbuser','TBL1','address', 
'', 'Select');

and I assume that now 'dbuser' will be able only to read 'address'
column from 'TBL1' table in 'DB1' database... but it is not true.

When 'dbuser' tries to do command

mysql> use DB1;

he got 'Access denied to DB1 for user dbuser@localhost' - the reason
is that there is no record in mysql.db table for database 'DB1' (I
assume). But if I give SELECT privileges to 'DB1' in mysql.db table
'dbuser' is able to read all columns in all tables in database DB1 -
it is obvious.

My question is:
Is there anybody who can tell me what I am doing wrong, or how can I
give privileges to read only several columns from table?

I use MySQL 3.23.33 on Debian Potato Linux.

Best Regards,
-- 
Jarek Jarzebowski


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to