2 Answers
Azure offers multiple Database services including both MySQL and MariaDB, so it depends on which one you want to use
https://docs.microsoft.com/en-us/azure/?product=databases
Not sure if I understand your question, especially why would you think that "MySQL is no longer free to use"?
Anyway, in the fictitious scenario where "MySQL is no longer free to use" or if it somehow becomes real, it doesn’t matter to Microsoft. If they manage to have negotiations, contracts and agreements with whoever the owner of the product, they can continue to provide it as an option for Azure Database. Microsoft doesn’t count on a product to be free in order to make it as a service for their Azure platform.