Guidance with MariaDB migration to Azure

Marc Hedgley 20 Reputation points
2024-09-12T12:22:42.91+00:00

Hello,

I am currently looking at migrating a MariaDB database hosted on AWS over to Azure as part of a cloud consolidation program. While Azure Database for MariaDB would seem like the most suitable choice, Microsoft has announced that this service will be retired in 2025.

I would like to ask for guidance on the best place to host this database within Azure. Research suggests that Azure Database for MySQL could be an appropriate alternative, but I would greatly appreciate any further guidance or recommendations on the target choice as well as migration methods.

Many thanks in advance.

Best regards, Marc

Azure Database Migration service
Azure Database for MariaDB
Azure Database for MariaDB
An Azure managed MariaDB database service for app development and deployment.
56 questions
Azure Database for MySQL
Azure Database for MySQL
An Azure managed MySQL database service for app development and deployment.
857 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vinodh247 24,081 Reputation points MVP
    2024-09-12T13:06:02.6466667+00:00

    Hi Marc Hedgley,

    Thanks for reaching out to Microsoft Q&A.

    Given that azure database for mariadb is set to retire in 2025, you're right to consider alternatives like azure database for mysql. Mysql and mariadb share a common ancestry, making azure database for mysql a strong candidate for hosting your mariadb database, with some caveats to consider regarding compatibility and performance.

    Recommended hosting options on azure:

    1. Azure database for mysql:

    compatibility: mariadb and mysql are largely compatible, but there are some differences in specific features and optimizations. Ensure that your application doesn't rely on mariadb-specific features that are not supported by mysql.

    Performance: azure database for mysql offers flexible scaling options, high availability, and built-in security features, which would be beneficial for a production workload.

    Maintenance: fully managed service, meaning less overhead for database administration tasks such as backups and patching.

    1. Azure virtual machines (VM) hosting mariadb:

    if you require full control over the mariadb version or need specific features not available in mysql, deploying mariadb on an azure vm could be an option. This, however, would require managing your own backups, updates, and high-availability setups.

    This approach is more complex than a fully managed service but may give you the flexibility to customize the database environment.

    1. Azure kubernetes service (aks) with mariadb:

    if you're already using containerized workloads, deploying mariadb in aks could be an option. This would allow for scalability, high availability, and integration with other containerized services. However, this approach involves more operational complexity.

    Migration methods:

    1. Azure database migration service (DMS):

    DMS supports migrations from mariadb to mysql and provides an easy way to migrate databases while minimizing downtime. It supports both online and offline migrations, which can help depending on your business needs for uptime.

    1. Manual migration using dump and restore:

    Use mysqldump (or mariadb-dump) to export the data and import it into azure database for mysql. This method is simple but may involve longer downtime compared to other methods.

    1. Replication-based migration:

    Set up replication from your aws-hosted mariadb to an azure database for mysql or vm-hosted mariadb instance. This minimizes downtime and ensures that the data is synchronized until you're ready to cut over to azure.

    1. Using third-party tools:

    Tools like Percona Xtrabackup or Galera cluster can facilitate replication and data migration between mariadb and mysql.

    Key considerations:

    Test compatibility: Before committing to azure database for mysql, ensure your application is compatible with the features and performance of mysql. Run tests to catch any incompatibilities or performance bottlenecks.

    Downtime planning: Choose a migration strategy that meets your organization's downtime tolerance. Online migrations with minimal downtime can be achieved through dms or replication-based methods.

    Security: Leverage azure’s built-in security features, such as vnet integration, private endpoints, and managed identities, to secure your database post-migration.

    Please 'Upvote'(Thumbs-up) and 'Accept' as an answer if the reply was helpful. This will benefit other community members who face the same issue.

    1 person found this answer helpful.
    0 comments No comments

  2. Oury Ba-MSFT 19,571 Reputation points Microsoft Employee
    2024-09-12T19:23:24.6+00:00

    @Marc Hedgley Thank you for reaching out.

    Correct, Azure Maria db is in retirement phase. See https://learn.microsoft.com/en-us/azure/mariadb/select-right-deployment-type

    https://learn.microsoft.com/en-us/azure/mariadb/whats-happening-to-mariadb

    User's image

    I would suggest migrating to Azure MYSQL flexible as stated above by Vino.

    Learn how to migrate from Azure Database for MariaDB to Azure Database for MySQL - Flexible Server.

    Regards,

    Oury

    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.