Problem installing MySQL with Linux


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

I was trying to configure MySQL as a back-end database to work on Airflow.
Below are my settings:

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 have an error executing the airflow initdb command. I'm not sure why this error occurs, but it certainly is 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