1. Home
  2. MySQL
  3. Stored procedure creation fails

Stored procedure creation fails


During a database import, a stored procedure may be included in the backup. Although the backup is complete, restoring it within phpMyAdmin, the control panel, or mysql CLI fails with a similar error:

#1227 – Access denied; you need (at least one of) the SUPER privilege(s) for this operation


Included in the procedure definition is a DEFINER clause. DEFINER clauses require SUPER privileges, which also permit the user access to set critical database configuration parameters, terminate users, and change replication settings. Naturally, these cannot be accessed by users for security reasons.


Remove DEFINER subclause from CREATEPROCEDURE, for example:

CREATE DEFINER=`myuser`@`localhost` PROCEDURE `some_proc`(user INT, fingerprint VARCHAR(64))


CREATE PROCEDURE `some_proc`(user INT, fingerprint VARCHAR(64))


Updated on July 8, 2019

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help! If you get an error, visit https://lithiumhosting.com/support instead.
Contact Support