数据库优化

qrnn
youngS 3 years ago
parent bbf9664fc7
commit 27b8a21556
  1. 1
      fir_ser/fir_ser/settings.py

@ -93,6 +93,7 @@ DATABASES = {
'PASSWORD': DBCONF.password, 'PASSWORD': DBCONF.password,
'HOST': DBCONF.host, 'HOST': DBCONF.host,
'PORT': DBCONF.port, 'PORT': DBCONF.port,
'CONN_MAX_AGE': 3600,
# 设置MySQL的驱动 # 设置MySQL的驱动
# 'OPTIONS': {'init_command': 'SET storage_engine=INNODB'}, # 'OPTIONS': {'init_command': 'SET storage_engine=INNODB'},
'OPTIONS': {'init_command': 'SET sql_mode="STRICT_TRANS_TABLES"', 'charset': 'utf8mb4'} 'OPTIONS': {'init_command': 'SET sql_mode="STRICT_TRANS_TABLES"', 'charset': 'utf8mb4'}

Loading…
Cancel
Save