<aclass="url fn n profile-usercard-hover"href="https://social.msdn.microsoft.com/profile/mksunitha"target="_blank">mksunitha</a>
<time> 3/6/2017 10:56:56 PM</time>
<hr/>
<divid="content">MySQL in-app feature on App service has<ahref="https://blogs.msdn.microsoft.com/appserviceteam/?p=3225">announced general availability</a> 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 <strong>localdb</strong> database from MySQL in-app to aproduction 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 <ahref="https://blogs.msdn.microsoft.com/appserviceteam/2017/03/06/announcing-general-availability-for-mysql-in-app/#productionmysql">one</a> these options. For this blog post I am using a production Azure database for MySQL(Preview). <span>For details , refer to </span><ahref="https://docs.microsoft.com/en-us/azure/mysql/quickstart-create-mysql-server-database-using-azure-portal">How to create MySQL database from Portal</a><span> or </span><ahref="https://docs.microsoft.com/en-us/azure/mysql/quickstart-create-mysql-server-database-using-azure-cli">How to create MySQL database using CLI.</a>
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 foryour production database.
3. Login to the <ahref="https://portal.azure.com">Azure portal</a>.Click on your web app using MySQL in-app. Select MySQL in-app setting for your web app and Click on <strong>Export</strong> button under<strong>MySQL in App Export</strong>
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.
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.
8. Once the export is successful , review your production database to make sure all the content was successfully updated. Note <spanstyle="text-decoration: underline"><strong>we do not turn off</strong></span> 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.