MySQL Forums :: Stored Procedures :: Stored procedure doesn't work correctly


Advanced Search

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
Stored procedure doesn't work correctly 314 Quazi Siddiqui 03/03/2017 09:22PM
Re: Stored procedure doesn't work correctly 35 Peter Brawley 03/03/2017 11:06PM
Re: Stored procedure doesn't work correctly 36 Quazi Siddiqui 03/03/2017 11:17PM
Re: Stored procedure doesn't work correctly 33 Peter Brawley 03/04/2017 12:59AM
Re: Stored procedure doesn't work correctly 31 Quazi Siddiqui 03/06/2017 10:33AM


Sorry, only registered users may post in this forum.

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.