Installing MySQL.Data on Azure App Service deployment slot

161 views Asked by At

What's the best way to install MySql.Data on azure app service?

We have a PHP application that requires some powershell scripts to be run in the background, these scripts must connect to the MySQL database (Azure MySql). The current code requires the "MySql.Data.dll" to do so. This is not something we have.

Add-Type -Path "D:\home\data\bin\MySQL.Data\v4.5.2\MySql.Data.dll"

This is a tool we've recently inherited and their current solution is to install the MySQL .NET Connector on a windows machine and upload the binary contents.

Personally would like a more maintainable method of doing so.

If you require more information please do ask.

Many thanks

2

There are 2 answers

0
Harry On BEST ANSWER

Albeit not the best solution the current most optimal way we could decide is to continue with uploading the contents of the downloaded tool as suggested by this article here:

https://poszytek.eu/en/microsoft-en/azure-en/references-in-azure-functions-custom-dlls-how-to/

1
Harshita Singh On

I would recommend you to use MySQL database on Azure.

It is a type of relational database service that is fully compatible with MySQL protocols and provides users with a fully-managed database service. The service offers stable performance, rapid deployment, high availability, and high security. To cater to a variety of user performance requirements, the MySQL on Azure service provides six different versions that offer performance that ranges from low to high.

MySQL Database on Azure is a fully-managed database platform service, you can focus on service-logic development without worrying about infrastructure details.