pycharm的django连接数据库的时候报错,不知道为什么,看一下这个错误是为什么,我上网上搜也没有

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.