django.db.utils.InternalError: (1193, "Unknown system variable 'default_storage_engine'")
把链接的语句去掉default试试:
"OPTIONS":{"init_command":"SET storage_engine=INNODB;"}
settings
确认DB类型
确认DB Driver
options注释后再试,
Settings | Django documentation | Django
OPTIONS¶
Default: {} (Empty dictionary)
Extra parameters to use when connecting to the database. Available parameters vary depending on your database backend.
Some information on available parameters can be found in the Database Backends documentation. For more information, consult your backend module’s own documentation.
Another option is to use the init_command option for MySQLdb prior to creating your tables:
'OPTIONS': {
'init_command': 'SET default_storage_engine=INNODB',
}
This sets the default storage engine upon connecting to the database. After your tables have been created, you should remove this option as it adds a query that is only needed during table creation to each database connection.