C2 W4 Airflow best practices lab: Cannot connect to MySQL database

I get this error when trying to run the simple_dag.py on Airflow UI: MySQLdb.OperationalError: (2059, ‘Plugin http could not be loaded: /usr/lib/x86_64-linux-gnu/libmariadb3/plugin/http.so: cannot open shared object file: No such file or directory’) - How would I install this plugin in the DAG environment?

Hello @rush254

Sorry for the inconvenience. Unfortunately, I was not able to reproduce the problem. These are the things that come to my mind:

  1. Make sure you have created mysql_connection connection in the Airflow UI as is described in exercise 3.
  2. Try matching your code in simple_dag.py file with the code available in the solution files to see if there is anything different.
  3. Restart Airflow by running the command bash ./scripts/restart_airflow.sh in the cloud9 terminal, and the run your DAG again.

Ultimately, if the issue persists, please share a screenshot of the error you see so that I share it with the team and see if we can delve deeper into the problem.

Double check the connection. Make sure you’ve removed the http:// and the trailing slash from the RDS endpoint.

2 Likes

Thanks. It solved the problem.

this helped me to recognize my extra addition to the link when copying and pasting. Thanks for the hint.