Invalid subscription error when deploying MySQL Flexible instance

Stephen Bethke 46 Reputation points
2023-02-27T14:02:11.88+00:00

I am trying to deploy a MySQL instance into a VNET with private DNS in a different subscription.

It is failing with the error: "The subscription '

Azure Private Link
Azure Private Link
An Azure service that provides private connectivity from a virtual network to Azure platform as a service, customer-owned, or Microsoft partner services.
551 questions
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. Jean Yves AbLé 81 Reputation points
    2024-01-16T14:19:25.8366667+00:00

    Hello ,
    I had the same problem with MySQL Flexible Server .
    The deployment was failed with following error :

    {
        "status": "Failed",
        "error": {
            "code": "InvalidPrivateDnsZoneSubscription",
            "message": "The subscription 'XXXXX-XXX-XXXX-XXX-XXXX' of the private DNS zone 'privatelink.mysql.database.azure.com' is in valid, it is not registered for '2'."
        }
    }
    

    To resolve it , the unique provider to register is Microsoft.DBforMySQL on Private Dns Zone subscription.
    Thanks
    Jean Yves

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Stephen Bethke 46 Reputation points
    2023-02-27T15:07:31.93+00:00

    I managed to resolve this myself by adding the following Resource Provider registrations to the subscription containing the private DNS zone:

    Microsoft.DomainRegistration

    Microsoft.DBforMySQL

    Unfortunately I don't know which one fixed it because I applied them both at the same time, but hopefully this helps someone else who encounters the same problem!

    1 person found this answer helpful.

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.