MySQL Forums
Forum List  »  Triggers

Grant privileges with Trigger
Posted by: Guillermo Palafox
Date: April 14, 2012 09:27PM

Hi all!

First, I'm going to explain my situation...

I'm working with webmin, wich when you create a unix user it creates a mysql user.

Well... now my question...

I would like that when a mysql user is created, perform this sentence: "GRANT ALL PRIVILEGES ON `userdbname\_%`.* TO `username`@localhost" to achieve the users can create and delete their own databases and their databases's name looks like 'user_something'.

Can I do this with a Trigger? and How should be the sentence?



Options: ReplyQuote

Written By
Grant privileges with Trigger
April 14, 2012 09:27PM

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.