The document says it uses a database installed in your local machine. The parameters are added in .env file to support the connection request. I see that you are following a different procedure. Can you clarify that
How do I install MySQL packages in Linux VM on Azure App Service?
Hi everyone, I'm trying to deploy my Django app on Azure for a school project. I've been following this tutorial here but my app uses MySQL instead of Postgre. Everything was going fine until I ran the python
manage.py
migrate
command. It failed with the "Unknown MySQL server host" error. The database server was already up and running, so I tried to connect to the database from the SSH terminal and got this. And even if I could install the package on the machine won't it be temporarily only since the data outside of /home is not persisted. Can anyone tell me how to deal with this? Thanks a lot!
2 answers
Sort by: Most helpful
-
-
VenkateshDodda-MSFT 18,021 Reputation points Microsoft Employee
2023-03-06T07:57:41.9266667+00:00 @Nguyễn Tuấn Nam Thank you for reaching out to Microsoft Q&A, apologize for any inconvenience caused on this.
Looking at the tutorial shared we understand that you are using blessed image in your app service, and it is not recommended to install thedatabase
server on app service and App service are designed to build and host your web application.Based on the screenshot shared, we see that you are trying to install
mysql server
on the app service(sudo is not supported in the ssh kudu console) if you want to installmysql-server
then I would suggest you create a custom container (building with custom image using docker) and host it on app service.You can also create a Mysql database on Azure and connect to it using python as mentioned here.
Feel free to reach back to me if you have any further questions on this.