Hi, I'm trying to customize permissions for a particular database and have run into an odd problem. I'm hoping someone on this list can suggest what I'm doing wrong. The setup is as follows:
Database: property User '[EMAIL PROTECTED]' should be able to run SELECTs on this database User '[EMAIL PROTECTED]' should be able to run SELECTs and INSERTs on this database I read in the MySQL manual that between the 'db' and 'host' tables, if the 'db.host' field is empty, MySQL will look up the 'host' table for a list of allowed hosts and set privileges as the intersection of the two tables. http://dev.mysql.com/doc/refman/5.1/en/request-access.html So I ran the following queries: insert into user (host, user, password) values ('%.example.com', 'bill', ''); insert into db (host, db, user, select_priv, insert_priv) values ('', 'property', 'bill', 'Y', 'Y'); insert into host (host, db, select_priv, insert_priv) values ('home.example.com', 'property', 'y', 'n'); insert into host (host, db, select_priv, insert_priv) values ('office.example.com', 'property', 'y', 'y'); flush privileges; Per my understanding of what the manual page says, this should accomplish what I am trying to do. However, when I log in using the specified user/host combination (from either host), I cannot see the 'property' database. Also, SHOW GRANTS does not display the privileges set above. When I do the same thing using the GRANT command, it works. On investigation, I see this is because it is inserting a separate record for each host into the 'db' table, and not writing anything to the 'host' table. So my question is: why does the 'if empty db.host field/look up in host table' method suggested in the manual not work? What step am I missing? Thanks in advance for your help. I'd appreciate it if you could reply to me directly as well as the list. Vikram -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]