Lost server admin user access for azure database for MySql server

301 Views Asked by At

We have recently migrated database of our core angular application to use Azure database for MySQL and got server admin user created for us. Recently, by mistake, we incorrectly removed privileges for server admin account and lost all access on our database by that account.

As azure MySQL database can only have one server admin user, Please let me know how to grant all permission to server admin account as we now get access denied while creating a new user or accessing MySQL.user table.

I have spent a lot of time googling for an answer today but didn't find any reference to the problem I am facing. Let me know if any other detail is required and I will be happy to provide.

2

There are 2 best solutions below

0
On BEST ANSWER

You should be able to fix this using the Backup and restore in Azure Database for MySQL

Azure Database for MySQL automatically creates server backups and stores them in user configured locally redundant or geo-redundant storage. Backups can be used to restore your server to a point-in-time. Backup and restore are an essential part of any business continuity strategy because they protect your data from accidental corruption or deletion.

Backups
Azure Database for MySQL takes full, differential, and transaction log backups. These backups allow you to restore a server to any point-in-time within your configured backup retention period. The default backup retention period is seven days.

0
On

Resetting server admin password will automatically reset the server admin privileges to default. Consider resetting your server admin password if you accidentally revoked one or more of the server admin privileges.

Refer to: https://learn.microsoft.com/en-us/azure/mysql/howto-create-manage-server-portal