1. Startseite
  2. MySQL
  3. Gespeicherte Prozeduren lassen sich nicht erstellen

Gespeicherte Prozeduren lassen sich nicht erstellen

Übersicht

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

Ursache

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.

Lösung

Remove DEFINER subclause from CREATEPROCEDURE, for example:

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

becomes:

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

 

Aktualisiert am März 7, 2021

Verwandte Artikel