Matte_Kudasai
Matte_Kudasai

Reputation: 1

Python Azure Function inserts rows to a MySQL Flexible Server locally, but it doesn't on the cloud

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:

# 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?

Upvotes: 0

Views: 133

Answers (1)

Matte_Kudasai
Matte_Kudasai

Reputation: 1

Finally, I've made it.

Used Python 3.10.10 and mysql-connector-python as connector.

Also, I don't know if this has something to do but I've created a new app funct with Insights.

Upvotes: 0

Related Questions