How to give Azure MYSQL account DBA role with privileges

Arsh 5 Reputation points
2023-07-04T12:40:20.51+00:00

I created a MySQL server hosted by Azure, and when using the username and password that i used in sign up process, that account has a limited role (UserAdmin) with not enough privileges. I see the azure_superuser has the DBA role but how can i access that account? What is the password for that account?

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
992 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. RahulRandive 10,486 Reputation points Volunteer Moderator
    2023-07-04T15:31:43.4633333+00:00

    Hi @Arsh

    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:

    [code language="sql"]CREATE USER 'testuser'@'%' <span>IDENTIFIED </span>BY 'your_password_here';[/code]

    Please find details in below community blog-

    GRANT SUPER privilege on Azure Database for MySQL - Microsoft Community Hub

    Regarding azure_superuser, All Azure Databases for MySQL servers are created with a user called "azure_superuser". Microsoft created a system account to manage the server to conduct monitoring, backups, and other regular maintenance. 

    As this is a PaaS service, so you will not have access to the Super User account. You will have access to the Admin account: Azure PostgreSQL Server Admin Document

    Hope this helps!

    Let us know if you have any question or need additional information.

    Thank you!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.