Home > Database > Mysql Tutorial > Why Am I Getting \'Access denied; you need (super) privileges for this operation\' When Creating Functions in phpMyAdmin?

Why Am I Getting \'Access denied; you need (super) privileges for this operation\' When Creating Functions in phpMyAdmin?

Susan Sarandon
Release: 2024-11-02 10:40:02
Original
458 people have browsed it

Why Am I Getting

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>
Copy after login

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>
Copy after login

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!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template