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.


On : 5.5 version, Stored Routines

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

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

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.

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.


Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms