MySQL Forums
Forum List  »  General

Creating Views - Permission Problems
Posted by: simmank.daniel
Date: February 15, 2006 06:40AM

Hi all!

I've got a little permission-problem with the creation of views using MySQL Server v5.0.16 under Unix.

There are 2 databases on my Server. One of them contains some data that are created by another program (running a cyclic .csv data import to migrate them into my MySQL-DB) and the other db is my own one, where I want to save some data.

In order to get the whole think secure, I created a user, that has the permission to select data, create- and show views in the first database (he may NOT be able to change any structures or datas in this database) and has full access to the second database.


Now I'm trying to set up a view in the second database (where the user may do anything he wants) that is selecting data from the first database. Something like this:

CREATE VIEW db2.test as SELECT * FROM db1.table1;

Now I'm getting the following error:
create view command denied to user 'dbrw'@'localhost' for column 'id' in table 'test'

Running the above command as root works fine (By the way: SELECT * FROM db1.table1 works fine too).

Of course I granted the necessary permissions to the user 'dbrw' using the following commands:

GRANT ALL ON db2.* TO 'dbrw'@'localhost';
GRANT SELECT, CREATE VIEW, SHOW VIEW ON db1.* TO 'dbrw'@'localhost';

Now my question: Why am I not able to create that view? Did I miss something? Is this a bug? Or am I just to stupid? :-)

Thanks to all of you, that wanna help!

Options: ReplyQuote


Subject
Written By
Posted
Creating Views - Permission Problems
February 15, 2006 06:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.