Can't access a database after trying to delete it.

Damien Doumer 0 Reputation points
2024-06-16T14:05:17.91+00:00

I created a database in Azure database for MySQL, flexible server.

The database was used and a couple of tables in it have thousands of records. I want to drop the database, but I keep having a timeout. I then went to Azure portal to delete the database there. The operation took several minutes, but failed. and I decided to delete data row by row. But, when I start running delete queries in MySQL workbench for each row, I get a time out. select queries work well, but I can't do a get request. Can someone help please ?

Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
850 questions
{count} votes

1 answer

Sort by: Most helpful
  1. ShaktiSingh-MSFT 15,501 Reputation points
    2024-06-17T04:56:50.99+00:00

    Hi Damien Doumer •,

    Welcome to Microsoft Q&A forum.

    As I understand, you could not delete Azure Database for MySQL Flexible Server as it gets timed out.

    Please try below ways and see if this helps:

    1). Try to Stop server first and then perform Delete operation as when the Server is at Start mode, there could be management operations going on the backend which could block he deletion operation.

    Refer: https://techcommunity.microsoft.com/t5/azure-database-for-mysql-blog/investigating-connection-issues-with-azure-database-for-mysql/ba-p/2121204

    2). Try to perform delete operation using Azure CLI/Powershell.

    For deletion of flexible server:

    az mysql flexible-server delete --resource-group testGroup --name testserver

    For deletion of database in the server:

    az mysql db delete -g testgroup -s testsvr -n testdb

    Refer: https://learn.microsoft.com/en-us/cli/azure/mysql/flexible-server?view=azure-cli-latest#az-mysql-flexible-server-delete

    https://learn.microsoft.com/en-us/cli/azure/mysql/db?view=azure-cli-latest#az-mysql-db-delete

    Let us know if this helps.

    If not, please share configuration details. network settings, region etc of your server so that we can investigate.

    Thanks

    0 comments No comments

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.