If the following symptoms apply to you:
- You recently migrated from Azure MariaDB to Azure MySQL.
- MySQL Workbench is able to return data successfully.
- You have not made any changes to your Python scripts, but they are no longer able to retrieve data as they did before the migration.
What you should do?
- Please check if you are using mysql-connector as your library. If yes, please uninstall it by using this command:
- pip uninstall mysql-connector -y
- After that, please run this command to install the correct MySQL library for Python:
- pip install mysql-connector-python
Some useful reference articles related to this issue:
- Review this article from Microsoft and you will notice that they are using mysql-connector-python as the library: https://learn.microsoft.com/en-us/azure/mysql/flexible-server/connect-python
- Project page for mysql-connector-python: https://pypi.org/project/mysql-connector-python/
- Project page for mysql-connector, which you can see they mentioned it is deprecated: https://pypi.org/project/mysql-connector/
No comments:
Post a Comment