An Azure managed MariaDB database service for app development and deployment.
Thanks for posting your query on Microsoft Q&A!
I would like to include more details in detailed way in addition to Akex Answer.
You are trying to do backup and restore an Azure MariaDB database to your on-premises MySQL server. Here's how you can do it using mysqldump, which is the primary tool for this task:
- Exporting from Azure MariaDB:
- First, ensure you have
mysqldumpinstalled on your machine (this can be your local laptop or a jump box in Azure that can connect to both servers).- Use the following command to create a backup of your Azure MariaDB:
mysqldump --host=<your-azure-server-name>.mariadb.database.azure.com --user=<username> --password=<password> --ssl-mode=REQUIRED <database-name> > backup.sql- Replace
<your-azure-server-name>,<username>,<password>, and<database-name>with your actual values. This will generate a file namedbackup.sqlcontaining your database schema and data.
- Replace
- Use the following command to create a backup of your Azure MariaDB:
- Importing to On-Premises MySQL:
- After you have your backup, you can import it into your on-premises MySQL server using:
mysql --host=<on-prem-server> --user=<username> --password=<password> <database-name> < backup.sql - Again, replace
<on-prem-server>,<username>,<password>, and<database-name>with the appropriate values for your setup.
- After you have your backup, you can import it into your on-premises MySQL server using:
Please go through the below Microsoft documents for more details on how to migrate the Maria DB
- https://learn.microsoft.com/azure/mariadb/howto-migrate-dump-restore
- Here you can see step wise details on how to backup and restore the Maria DB https://techcommunity.microsoft.com/blog/adformysql/migrating-from-azure-database-for-mariadb-to-azure-database-for-mysql-using-mydu/4403467
Please let us know if you have further questions on this.
Kindly consider upvoting and Accepting the Answers, if the information provided is helpful. This can assist other community members in resolving similar issues.
Thanks!
Kalyani