Allow a user can see stored procedures created by others users

1.4k views Asked by At

I have a MySQL database with some stored procedures. The problem is that there are two different users who created several procedures, so that just the user who created the stored procedure can see your content. Within this context, I want all the two users could see all stored procedures, in other words, those created by him and another user.

How this could be possible?

2

There are 2 answers

3
Jay Ehsaniara On

try:

GRANT Execute  ON `db_name`.* TO `user_1`@`localhost`;
GRANT Execute  ON `db_name`.* TO `user_2`@`localhost`;
0
apesa On

To allow multiple Users access to others Stored Procs you should use the GRANT statement as follows.

GRANT EXECUTE ON PROCEDURE mydb.myproc TO 'userx'@'localhost';

You can find more details HERE