Django with MariaDB Troubleshoot

Django behind uWSGI and NGINX

If you are struggling with below error while deploying Django on VPS, this post may help and save you hours for MariaDB Troubleshoot.

  • Did you install mysqlclient or MySQL-python?
  • OSError: mysql_config not found
  • ModuleNotFoundError: No module named ‘ConfigParser’

This is my 2nd times try out Django with MariaDB. The 1st one went smoothly. Couple of searches and I find that I only need to add a simple line into “activate” file of Python VirtualEnv

2nd time didn’t go right, when running “python manage.py migrate“, I got “Did you install mysqlclient or MySQL-python?“. Continue trying to run “pip install mysqlclient“, I got “OSError: mysql_config not found“, and sometimes “ModuleNotFoundError: No module named ‘ConfigParser‘”

MariaDB Troubleshoot

I tried and installed many things and not quite sure which one resolved the issue. I do believe below helped me out

“yum install mariadb-devel”

After running above command, I was able to “pip install mysqlclient” and “python manage.py migrate”

,

Leave a Reply