I'm trying to insert some rows into a test table of an MySQL Flexible Server running on Azure using a time triggered Azure Function (as the title mentions, using Python v3.10.10).
Locally, it works like a charm (the table on the server is affected and the rows are added).
The problem begins here: when I uploaded it to the cloud, it doesn't affects the database. The code runs, but it does nothing than consume resources.
Additionally, I can't see the logs because I didn't configurate Insights. So I'm blindfold.
Does anyone had the same problem implementing this kind of solution? I've seen some videos, posts, etc. but at the moment of truth the database ends empty.
Notes:
- After the deploying of the code, I've uploaded the local application settings.
- The DB uses a SSL Cert, but, I didn't have any problems with that because I've followed Christopher explanation ( see: Azure Functions (Python) cannot connect to Azure MySQL instance with [SSL: WRONG_VERSION_NUMBER])
- My requirements.txt is the following:
# DO NOT include azure-functions-worker in this file
# The Python Worker is managed by Azure Functions platform
# Manually managing azure-functions-worker may cause unexpected issues
azure-functions
mysql.connector
mysql
mysql-connector
If there's something to add, please let me know !
Thanks!
P.S. : Have patient with me, I'm triying to learn and it's my first trying with Functions :P
I've tried to check the db configuration and everything seems in conditions. Maybe, there's something with the Az Server running the function?