1

When I request my database server (MySQL), with "show grants for current_user"

I notice that I have the grant to execute procedure:

SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES, EXECUTE 

But when I execute a sql file that contains those instructions :

DROP FUNCTION IF EXISTS 
DROP FUNCTION IF EXISTS 
DROP PROCEDURE IF EXISTS
CREATE FUNCTION 
CREATE PROCEDURE
DECLARE
CALL

I have this error :

ERROR 1044 (42000) at line 16: Access denied for user

The line 16 contains : CREATE FUNCTION function_name( .. )

Should I have other grants ?

0
5

From MySQL Documention:

The CREATE ROUTINE privilege is needed to create stored routines (procedures and functions).

Example:

GRANT CREATE ROUTINE, ALTER ROUTINE ON yourDB.* TO youUser;

Max

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.