GRANT SUPER privilege on Azure Database for MySQL


The SUPER privilege is not supported on Azure Database for MySQL. The closest you can get is to create another admin level user with the same rights as the server admin you created to do this you can run:

CREATE USER 'testuser'@'%' <span>IDENTIFIED </span>BY 'your_password_here';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.* TO 'testuser'@'%' WITH GRANT OPTION;

You can get the privileges the admin account has by logging in as the admin account and running:

SHOW GRANTS FOR CURRENT_USER;

This does mean you cannot run things like SET GLOBAL, to set global level settings please use the properties items in the portal.

Comments (4)

  1. Chris says:

    There is a typo in the first command. It should be IDENTIFIED BY not IDENIFIED BY

    1. Thank you for your comment. I fixed the typo.

  2. Alex says:

    Hi! I’m having a similar issue and I would like to write it here in case anyone stumbles upon this article.
    You are NOT allowed to create stored functions (you are allowed to create stored procedures although) because somehow stored functions need to write in Binary Log (don’t exactly know why) which requires SUPER privileges.

    1. Stereo says:

      We solved setting parameter “log_bin_trust_function_creators” to ON (Portal > your Azure DB for MySQL Server> Server Parameters)

Skip to main content