My Oracle Support Banner

Cannot Grant EXECUTE Privilege on Stored Procedures (Doc ID 1499279.1)

Last updated on MARCH 08, 2017

Applies to:

MySQL Server - Version 5.5 and later
Information in this document applies to any platform.

Symptoms

On : 5.5 version, Stored Routines

When attempting to grant EXECUTE privileges and create stored procedures,
the following error occurs.

ERROR
-----------------------
mysql> GRANT EXECUTE ON test_global_position.* TO testowner@'%';
mysql> CREATE PROCEDURE ReconcilePBMarketValue (IN inPcpID INTEGER, IN inDate DATETIME)
BEGIN
...
END
0 row(s) affected, 1 warning(s): 1404 Failed to grant EXECUTE and ALTER ROUTINE privileges


STEPS
-----------------------
The issue can be reproduced at will with the following steps:
1. Start with a clean install of MySQL Server which did not run the mysql_secure_installation script.
2. Create a database with the prefix 'test_' and apply the GRANT privilege across all procedures for a particular user (must be existing).
3. Attempt to create a procedure in the new database.

BUSINESS IMPACT
-----------------------
The issue has the following business impact:
Due to this issue, users cannot easily define permissions for stored procedures and defaulted to setting privileges per procedure.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.
My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.