-
Notifications
You must be signed in to change notification settings - Fork 14.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MYSQL_OPT_RECONNECT is deprecated. When exec airflow db upgrade. #32708
Comments
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval. |
To address this warning, you may consider using the OPT_RECONNECT option of MySQL Connector/C++ instead of MYSQL_OPT_RECONNECT. |
I believe it's you who have to change it. Tthere is nothing we can do about it because we do not set this option. It likely comes from your configuration on version of driver you are using or sqlalchemy. You should investigate where it comes from (look at database section configuration where you can set your options or check in the documentation of sqlalchemy/drivers in the version that you are using adds this option. |
When I run airflow standalone, there are too many : |
It seem that MYSQL_OPT_RECONNECT will be deprecated, but I dont know where to config, sqlalchemy or airflow or mysqlclient or mysql |
I solve this question by change diver from mysqlclient to mysql-connector-python |
I could confirm that this error persist and we could see it in CI tests for MySQL backend, and to be honest we do not have a lot of options here. Spoiler Alert: It not affect our ARM image, only x86_64 Oracle deprecate this options in their C API https://dev.mysql.com/doc/c-api/8.0/en/c-api-auto-reconnect.html in 8.0.34 , which provided by
Possible options (I can miss something)
cc: @potiuk |
Guys, is there a workaround to suppress this warning at all? Tried some of the suggestions here https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#logging and the effect is applied only for airflow specific logging messages |
No. The messages printed directly to stdout/stderr by Best solution for some one who only started with Airflow and doesn't have anything critical in production is use Postgres as DB Backend 🙄 Other potential solutions described here: #32708 (comment) and I can confirm that there are no such of warning messages with latest MariaDB client libraries (Note: this is experimental support) |
@bmarquesplanet @Sunny-Island good news, SQLAlchemy 1.4.50 was released 2 days ago and seems like this version fixed pre-ping behaviour for |
Apache Airflow version
2.6.3
What happened
When I install airflow can set backend database, I set mysql as my backend. And I exec
airflow db upgrade
It shows many warning info contains "WARNING: MYSQL_OPT_RECONNECT is deprecated and will be removed in a future version."
What you think should happen instead
No response
How to reproduce
mysql_config --version
8.0.34
mysql --version
mysql Ver 8.0.34 for Linux on x86_64 (MySQL Community Server - GPL)
setup airflow backend and run
airflow db upgrade
Operating System
CentOS 7
Versions of Apache Airflow Providers
No response
Deployment
Other
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: