Welcome to our detailed tutorial on integrating Apache Airflow with a MySQL server running on Windows! In this video, we walk you through the entire process of migrating your Airflow database from an Ubuntu environment to a MySQL server on Windows. Whether you’re setting up Airflow with MySQL for the first time or transferring your existing Airflow database, this step-by-step guide is designed to make the migration process smooth and straightforward.
In this video, you will learn:
How to configure Airflow with a MySQL server on Windows
The essential steps to migrate the Airflow database from Ubuntu to Windows
Best practices for a successful Airflow database integration
Common challenges and troubleshooting tips for Airflow MySQL migration
Commands Used in This Video:
1) Creating Database for Airflow:
CREATE DATABASE airflow_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'airflow_user' IDENTIFIED BY 'airflow_pass';
GRANT ALL PRIVILEGES ON airflow_db.* TO 'airflow_user';
2) Define Connection in airflow.cfg:
sql_alchemy_conn = mysql+mysqldb://airflow_user:[email protected]:3306/airflow_db
3) Installing MYSQL client on Ubuntu:
sudo apt install libmysqlclient-dev
4) Exporting Environment Variables:
export MYSQLCLIENT_CFLAGS="$(mysql_config --cflags)"
export MYSQLCLIENT_LDFLAGS="$(mysql_config --libs)"
5) Pip install MYSQL Client:
pip install mysqlclient
6) Creating an Airflow User:
airflow users create --username admin --password admin --role Admin --firstname admin --lastname admin --email [email protected]
7) Migrate Airflow:
airflow db migrate
#Airflow #MySQL #DatabaseMigration #AirflowIntegration #UbuntuToWindows #AirflowSetup #TechTutorial