Migrate development database on MySQL in-app to production MySQL database

1 minute read • March 6, 2017

mksunitha
MySQL in-app feature on App service  has announced general availability today.  The feature has been keen on improve the experience of developing MySQL based applications on Azure App Service.  Once your application is ready to go live , you need to migrate the database content to your production database.  This can be tedious  task when done manually . In the MySQL in-app management settings ,  we now have, we have an option for easily exporting your localdb database from MySQL in-app to a production MySQL database.  This blog will discuss how to perform this migration of your database. Follow the steps below :
1. Create a production MySQL database using any one these options. For this blog post I am using a production Azure database for MySQL(Preview). For details , refer to How to create MySQL database from Portal or How to create MySQL database using CLI. 2. Copy the connection string for the Azure database for MySQL(Preview) database.  If you are using a different database solution for production , collect the database connection information for your production database. connectionstringmysql 3. Login to the Azure portal . Click on your web app using MySQL in-app. Select MySQL in-app setting for your web app and Click on Export button under MySQL in App Export migrate2 4. You have a choice of using a connections string for your production database or enter the credentials manually. Once the production database connection information has been entered , click on Save to start the process of export.  During the export a connection string will be added to the connection string setting in the portal. migrate4 During the export , you cannot make any changes to MySQL in-app configuration in the portal.  All options will be disabled to manage MySQL in-app during export process .You must wait until the export is completed. migrate3 8. Once the export is successful , review your production database to make sure all the content was successfully updated.  Note we do not turn off the MySQL in-app feature since your production application may still be using it. Update your application to connect to the production database and test your application before going live with your application. After successful testing , you can now turn off MySQL in-app feature for your web app to continue using production database.