更新时间:2023-01-30 18:30:37
我最近遇到了完全相同的问题. 我向Django提出了错误请求,但Django不接受该错误作为他们的错误.
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已从UTF8MB3切换为UTF8MB4作为默认字符集.从
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.
运行inspectdb时,INFORMATION_SCHEMA表仍位于UTF8MB3中,因此您将警告返回给Django,而Django目前无法忽略该警告.
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.
我有一个完全有效的示例,该示例如何解决Django错误凭单上的此错误: https://code.djangoproject.com/ticket/29678
I have a fully worked example of how to get around this error on the Django bug ticket: https://code.djangoproject.com/ticket/29678
我已经能够完全使用MySQL 8.0.12作为健壮的Django应用程序的后端 因此,一旦您解决了这个问题,就应该可以了.
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.