Creating functions in phpMyAdmin - Error: Access is denied, you need super privileges to do this
You want to import some MySQL functions into phpMyAdmin in, but encountered this error: "#1227 - Access Denied; You need super privileges to perform this operation."
To resolve this issue, please check the following:
Super Permissions
By default, only users with super permissions can create functions. If you are not a super user, please apply for this permission from the database administrator.
DEFINER clause
If a function's DEFINER clause specifies a specific user, that user must have super privileges or CREATE ROUTINE privileges. To avoid this permission requirement, remove the DEFINER clause from the statement. For example:
<code class="sql">CREATE FUNCTION `f_calc_gst`(p_ht decimal(15,3), p_province varchar(2)) RETURNS varchar(255) CHARSET utf8</code>
Delimiter
When executing a multi-line SQL query in phpMyAdmin, the delimiter field must be set. Find the Delimiter field below the SQL text box and enter the delimiter you want to use. For example, use a semicolon as a delimiter:
<code class="sql">DELIMITER ; CREATE FUNCTION `f_calc_gst`(p_ht decimal(15,3), p_province varchar(2)) RETURNS varchar(255) CHARSET utf8</code>
The above is the detailed content of Why Am I Getting \'Access denied; you need (super) privileges for this operation\' When Creating Functions in phpMyAdmin?. For more information, please follow other related articles on the PHP Chinese website!