Python manage.py inspectdb is giving following error even after all tables are having CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
from django.db import models
Python manage.py inspectdb is giving following error even after all tables are having CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
from django.db import models
I encountered the exact same issue lately. I raised a bug request to Django, but Django do not accept it as their bug.
MySQL 8 has switched from UTF8MB3 to UTF8MB4 as the default charset. As of 8.0.11 if you access a table that was created with the previous version a warning is returned encouraging you to switch to UTF8MB4.
When you run the inspectdb the INFORMATION_SCHEMA tables are still in UTF8MB3 so you get the warning returned to Django, which Django is currently unable to ignore.
I have a fully worked example of how to get around this error on the Django bug ticket: https://code.djangoproject.com/ticket/29678
I have been able to fully use MySQL 8.0.12 as a backend for a robust Django application so once you get past this issue you should hopefully be okay.