Grants for running a Stored Procedure

0

I have a usecase where a custom user need to run a SP in RDS. I gave the below grants to the user . PROCESS, REFERENCES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, EVENT, TRIGGER. I am not able to run the SP. Can anyone let me know what grants should i add/remove so that it will work?

Thanks, Rohith

demandé il y a 5 mois223 vues
1 réponse
0

I have tested in my lab to grant execute permission for specified user to executing a PROCEDURE.It went well

  1. Create PROCEDURE

DELIMITER // CREATE PROCEDURE get_all_cars() BEGIN SELECT * FROM manju; END // DELIMITER ;

  1. CREATE USER 'TestUser1'@'%' IDENTIFIED BY 'XXXXX';

  2. GRANT EXECUTE ON PROCEDURE manju.get_all_cars TO 'TestUser1'@'%'; FLUSH PRIVILEGES;

  3. Login mysql client through TestUser1 and ran below command.

    CALL manju.get_all_cars;

AWS
répondu il y a 5 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions