I'm trying to deploy a Flask web app with mysql connectivity. It's my first time using Azure, and coming off Linux it all seems pretty confusing.
My understanding is that one includes within the
The page cannot be displayed because an internal server error has occurred.
Per my experience, the resoure
https://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.1.14.tar.gz is for Linux, not for Azure WebApps based on Windows, and the link seems to be not available now.
I used the command
pip search mysql-connector to list the related package. Then, I tried to use
mysql-connector instead of
pip install, and tried to
import mysql.connector in local Python interpreter that works fine.
So please use
mysql-connector==2.1.4 instead of
mysql-connector-python== in the
requirements.txt file of your project using IDE, then re-deploy the project on Azure and try again. The package will be installed automatically as the offical doc said as below.
Packages listed in requirements.txt will be installed automatically in the virtual environment using pip. This happens on every deployment, but pip will skip installation if a package is already installed.
Any update, please feel free to let me know.