0

According to this page: https://learn.microsoft.com/en-us/azure/mysql/single-server/concepts-migrate-dump-restore

You can:

Copy the backup files to an Azure blob/store and perform the restore from there, which should be a lot faster than performing the restore across the Internet.

However there is no information on how to actually achieve this.

I created an Azure storage account, uploaded a large .SQL file, but I'm not sure how I would go about importing this using mysql.

Andrew Gee
  • 338
  • 1
  • 12

1 Answers1

0

To achieve your scenario, please try the below:

To restore MySql Database for MySql flexible server, you can run the below command from this MsDoc:

mysql -h [hostname] -u [uname] -p[pass] [db_to_restore] < [backupfile.sql]

For MySql flexible server:

$ mysql -h testserver.mysql.database.azure.com -u admin -p testdb <testdb_backup.sql

To create a backup file using mysqldump you can try the below command from this MsDoc:

$ mysqldump --opt -u [uname] -p[pass] [dbname] > [backupfile.sql]

For more in detail, please refer below links:

Backup Azure Database for MySQL to a Blob Storage by Bashar Hussein

Backup and restore SQL Server to Azure Blob storage by Bijay Kumar Sahoo

Rukmini
  • 6,015
  • 2
  • 4
  • 14