1. mysqlclient 1.3版本不对
解决办法:注释掉D:\Users\xxx\AppData\Local\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\base.py 的35和36这两行即可
2. 字符集的问题:报错如下:File "C:\Users\Administrator\PycharmProjects\xxx\venv\lib\site-packages\django\db\backends\mysql\operations.py", line 146, in last_executed_query query = query.decode(errors=‘replace‘)AttributeError: ‘str‘ object has no attribute ‘decode‘
解决办法: 注释掉D:\Users\xxx\AppData\Local\Programs\Python\Python37\Lib\site-packages\django\db\backends\mysql\operations.py 的145 和146这两行即可
这两个错误在将数据库从sqlite3迁移到mysql时报出.
原文:https://www.cnblogs.com/ryan255/p/11420235.html