MySQL Forums
Forum List  »  Stored Procedures

Re: Stored procedure doesn't work correctly
Posted by: Quazi Siddiqui
Date: March 06, 2017 10:33AM

Hi Peter,

Since MySQL 5.7 do not support creation of roles that we typically assign to users when we create tables.

I'm trying to put the below grant statements in a stored procedure to give the table level privileges when ever I create a new user.


GRANT USAGE ON *.* TO 'ABC123'@'%';
GRANT SELECT ON `%`.* TO 'ABC123'@'%';
GRANT SELECT, REFERENCES ON `Linker_Tracker_Branded`.`EID_Lookup` TO 'ABC123'@'%';
GRANT SELECT, UPDATE (Linker_EID, Decision), REFERENCES (Linker_EID, Decision) ON `Linker_Tracker_Branded`.`Linker_Tracker_ID` TO 'ABC123'@'%';
GRANT SELECT ON `Linker_Tracker_Branded`.`Linker_Tracker_ID_Hist` TO 'ABC123'@'%';

pls advise if there is any alternate option - Thanks

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Stored procedure doesn't work correctly
579
March 06, 2017 10:33AM


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.