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

posta 5 mesi fa225 visualizzazioni
1 Risposta
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
con risposta 5 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande