1. 程式人生 > >Django遠端連線MySQL出現的問題

Django遠端連線MySQL出現的問題

已經困擾兩天了,求大佬們看過來

環境:

  • Windows上搭建的pychram django-2.1.1
  • VMware 搭建的 centos6.5 上搭建的MySQL 5.5.22

困擾

在資料庫連線正常 給遠端使用者的許可權訪問操作資料庫 使用python manage.py runserver 可以正常開啟介面 但是在第一次執行python manage.py migrate 時出錯 它說是語法錯誤 但是怎麼改啊

報錯資訊

Traceback (most recent call last): File “manage.py”, line 15, in execute_from_command_line(sys.argv) File “C:\Py3.6\lib\site-packages\django\core\management__init__.py”, line 381, in execute_from_command_line utility.execute() File “C:\Py3.6\lib\site-packages\django\core\management__init__.py”, line 375, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File “C:\Py3.6\lib\site-packages\django\core\management\base.py”, line 316, in run_from_argv self.execute(*args, **cmd_options) File “C:\Py3.6\lib\site-packages\django\core\management\base.py”, line 353, in execute output = self.handle(*args, **options) File “C:\Py3.6\lib\site-packages\django\core\management\base.py”, line 83, in wrapped res = handle_func(*args, **kwargs) File “C:\Py3.6\lib\site-packages\django\core\management\commands\migrate.py”, line 203, in handle fake_initial=fake_initial, File “C:\Py3.6\lib\site-packages\django\db\migrations\executor.py”, line 91, in migrate self.recorder.ensure_schema() File “C:\Py3.6\lib\site-packages\django\db\migrations\recorder.py”, line 57, in ensure_schema raise MigrationSchemaMissing(“Unable to create the django_migrations table (%s)” % exc) django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the django_migrations table ((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 ‘(6) NOT NULL)’ at line 1”))

大佬求解!!!跪求!!!