Django Mysql SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED

Django 执行makemigrations  的时候报错:

django.db.utils.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED' at line 1")

  

网上搜索解决方案如下:

setting.py--->DATABASES 添加

'OPTIONS':{'isolation_level':None}

这个可能和我的mysql 版本有关,我的版本太低,用的mysql5.1
参考文章:http://bbs.51cto.com/thread-1550958-1.html
posted @ 2018-08-28 17:54  BigBao的博客  阅读(3177)  评论(0编辑  收藏  举报