[Solved] django.db.utils.OperationalError: (2026, ‘SSL connection error: unknown error number’)
Feb 25, 2022
I had this issue when running ‘python manage.py makemigrations’ from my Django project to a remote MySQL server. I’m using Django 3.1.7 and MySQL 8.0.
The below solution worked for me:
- Install PyMySQL
pip install PyMySQL
2. In __init__.py (under the same directory as settings.py), add the following:
import pymysqlpymysql.install_as_MySQLdb()
Hope this helps!