Why Azure MySQL server restart itself after 7 days when I stop it? How can I stop it from automatically starting? This is really annoying.

Vincent Li 61 Reputation points
2022-09-19T01:44:42.68+00:00

Why Azure MySQL server restart itself after 7 days when I stop it? How can I stop it from automatically starting? This is really annoying.

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

Accepted answer
  1. SSingh-MSFT 16,371 Reputation points Moderator
    2022-09-19T15:43:59.107+00:00

    Hi @Vincent Li ,

    Thanks for posting this question in Microsoft Q&A platform.

    Sorry for the inconvenience, but by design, Azure MySQL server will restart itself after 7 days even when stopped. Since it is a fully managed production-ready database service, to perform management operations this configuration is set.

    242480-image.png

    Reference Link: sample-cli-restart-stop-start

    However, there is a workaround using Powershell script, please take a look at: Auto Stop and Start your Azure Database for MySQL Single Server using PowerShell runbook

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification

1 additional answer

Sort by: Most helpful
  1. Pierre-Luc Giguere 1,076 Reputation points
    2022-09-19T13:22:53.333+00:00

    Hi Vincent,

    I wouldn't be able to tell the "why" but I can confirm it does that by design:

    When you Stop the server it remains in that state for the next 7 days in a stretch. If you do not manually Start it during this time, the server will automatically be started at the end of 7 days. You can choose to Stop it again if you are not using the server.

    Source:
    https://learn.microsoft.com/en-us/azure/mysql/single-server/how-to-stop-start-server

    My guess is that since it's a a PaaS, Microsoft wants to install patches and the likes, maybe ?

    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.