Reputation: 129
I am using DBForge and MariaDB10, what is happening is that I am using roles to control the acess to the database.
When I do some change on the procedure or function code the role loses the permission that I granted before, so I need to grant acess again.
This is bad because every time that I alter the code the user lost his acess and I need to grant again.
Anyone can help me or give me some light?
Upvotes: 0
Views: 427
Reputation: 1068
I have the same problem as OP and I landed here. It seems that this is the expected behaviour of MySql. The only workaround that I found is to get the privileges for the procedure I want to edit, and re run them, for this I use the following query
SELECT
CONCAT('GRANT EXECUTE ON ',Db,'.',Routine_name,' TO \'',User,'\'@\'',Host,'\';')
FROM mysql.procs_priv
WHERE Routine_name ='Procedure_name';
Upvotes: 0