user_image
By  清风穆云    On   2018年8月3日 09:28

我这里是Win10环境,mysql数据库,django2.0版本。没有使用虚拟环境运行但是还是出现这个报错,是怎么回事? d:\django_restful2>python manage.py makemigrations api Traceback (most recent call last): File "C:\Python35\lib\site-packages\django\db\backends\utils.py", line 83, in _execute return self.cursor.execute(sql) File "C:\Python35\lib\site-packages\django\db\backends\mysql\base.py", line 71, in execute return self.cursor.execute(query, args) File "C:\Python35\lib\site-packages\pymysql\cursors.py", line 170, in execute result = self._query(query) File "C:\Python35\lib\site-packages\pymysql\cursors.py", line 328, in _query conn.query(q) File "C:\Python35\lib\site-packages\pymysql\connections.py", line 516, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "C:\Python35\lib\site-packages\pymysql\connections.py", line 727, in _read_query_result result.read() File "C:\Python35\lib\site-packages\pymysql\connections.py", line 1066, in read first_packet = self.connection._read_packet() File "C:\Python35\lib\site-packages\pymysql\connections.py", line 683, in _read_packet packet.check_error() File "C:\Python35\lib\site-packages\pymysql\protocol.py", line 220, in check_error err.raise_mysql_exception(self._data) File "C:\Python35\lib\site-packages\pymysql\err.py", line 109, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.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")