I have an ASP.NET MVC app connected to a MySQL database, which works fine with my local MySQL server. I'm trying to push the app to azure using their new feature: MySQL in-app for Web Apps
Previously, I tested the same app in azure with a SQL server database and I got it working as follows:
- I created a SQL database in my azure portal, and I got its ADO.NET connection string as explained here: https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-dotnet-simple/
- I published the application from Visual Studio, with the Publish command. In its wizard I was able to set the DefaultConnection string which should be used at runtime.
Can I proceed similarly with the MySQL-in-app database? If so, how can a get the connection string to be set in the publish step? I found an explanation with a script here but I don’t understand where should I run it to get the connection string!
Environment.GetEnvironmentVariable( "MYSQLCONNSTR_localdb" )tooptions.UseSqlServer(). However, I still get 'access denied'. Is there anything more that needs to be done? How do I add the database (migrations) to MySQL in App?