I have a problem when one of my customers tries to create his own sql example function.
According to the MySQL manual the only privileges needed to do so is the CREATE ROUTINE privilege. The ALTER ROUTINE and EXECUTE privileges will be granted automatically (see http://dev.mysql.com/doc/refman/5.1/...procedure.html).
The problem is the MySQL fails to grant the ALTER ROUTINE and EXECUTE privileges:
It seems MySQL tries to do something in the background that is not mentioned in the manual. I think it may be something with MySQL not supporting user privileges to different databases and CPanel uses a workaround for this (by forcing db and dbuser names to contain the CPanel username).Code:MySQL (***@***.**): 2009-04-17 15:41:47: 1404: Failed to grant EXECUTE and ALTER ROUTINE privileges MySQL (***@***.**): 2009-04-17 15:41:47: 1410: You are not allowed to create a user with GRANT
Does someone have a clue?
Is it possible to create your own functions in MySQL under CPanel or is it impossible with how it is implemented?
The customers test code:
Code:CREATE FUNCTION [mysql-username].WEIGHTED_AVERAGE ( n1 INT, n2 INT, n3 INT, n4 INT ) RETURNS INT DETERMINISTIC BEGIN DECLARE avg INT; SET avg = (n1+n2+n3*2+n4*4)/8; RETURN avg END



LinkBack URL
About LinkBacks
Reply With Quote




