Problem installing MySQL on Linux


I have a strange problem installing MySQL on a Linux computer.

I tried to configure MySQL as the backend database for Airflow.
Below are my configurations:

Operating System: Red Hat Enterprise Linux Server 7.7
python 3.7.2
anaconda 3
spark 2.45

I can connect to MySQL, but I encountered an error when I ran the airflow initdb command. I am not sure why this error occurs, but it is certainly only due to MySQL.

Error:

(2020-04-09 05:19:00,990) {settings.py:253} INFO - settings.configure_orm(): Using pool settings. pool_size=5, max_overflow=10, pool_recycle=1800, pid=15499
Traceback (most recent call last):
  File "/home/npa/anaconda3/envs/python3.7.6/bin/airflow", line 25, in 
    from airflow.configuration import conf
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/airflow/__init__.py", line 47, in 
    settings.initialize()
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/airflow/settings.py", line 377, in initialize
    configure_orm()
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/airflow/settings.py", line 266, in configure_orm
    engine = create_engine(SQL_ALCHEMY_CONN, **engine_args)
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py", line 479, in create_engine
    return strategy.create(*args, **kwargs)
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/sqlalchemy/dialects/mysql/mysqldb.py", line 118, in dbapi
    return __import__("MySQLdb")
  File "/home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/MySQLdb/__init__.py", line 18, in 
    import _mysql
ImportError: /home/npa/anaconda3/envs/python3.7.6/lib/python3.7/site-packages/_mysql.cpython-37m-x86_64-linux-gnu.so: symbol mysql_real_escape_string_quote, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference