Django Mysql SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED

BigBao的部落格發表於2018-08-28

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

相關文章