Configuring a Remote MySQL Database for Airflow

This topic describes how to configure a remote MySQL database for Airflow on HPE Ezmeral Data Fabric.

Prerequisites

To connect to MySQL from Airflow, install mysqlclient. Perform the following steps:
  1. Run . <airflow_home>/build/env/bin/activate
  2. Run pip install mysqlclient==2.0.3
  3. Run deactivate

About this task

Airflow uses SQLAlchemy to connect to the metadata database. The metadata database stores the information about Airflow configurations, user information, roles and policies, and statistics of each DAG’s state, run, and task.

Airflow supports MySQL database engine of version 5.7 and 8.

Procedure

To configure the remote MySQL Database for Airflow, see Setting Up a MYSQL Database.