I am getting below error when i run airflow initdb after changing SQLALchemy details to connect to MySQL in airflow.cfg file.
Traceback (most recent call last):
File "/home/ec2-user/.local/bin/airflow", line 25, in <module>
from airflow.configuration import conf
File "/home/ec2-user/.local/lib/python3.7/site-packages/airflow/__init__.py", line 47, in <module>
settings.initialize()
File "/home/ec2-user/.local/lib/python3.7/site-packages/airflow/settings.py", line 405, in initialize
configure_orm()
File "/home/ec2-user/.local/lib/python3.7/site-packages/airflow/settings.py", line 294, in configure_orm
engine = create_engine(SQL_ALCHEMY_CONN, connect_args=connect_args, **engine_args)
File "/home/ec2-user/.local/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py", line 500, in create_engine
return strategy.create(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/home/ec2-user/.local/lib/python3.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 118, in dbapi
return __import__("MySQLdb")
File "/home/ec2-user/.local/lib/python3.7/site-packages/MySQLdb/__init__.py", line 18, in <module>
import _mysql
ImportError: libmysqlclient.so.18: cannot open shared object file: No such file or directory
Please help on this issue
question from:https://stackoverflow.com/questions/65623150/airflow-initdb-issue