bigdata-highway-analytics/config.py
18796357645 11657ae4f5 上传
2025-03-31 20:06:02 +08:00

17 lines
645 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# MySQL数据库配置
class BaseConfig:
DIALECT = 'mysql'
DRIVER = 'pymysql'
HOST = 'localhost'
PORT = '3306'
USERNAME = 'root'
PASSWORD = '123456'
DATABASE = 'bs_jaotong'
# mysql不识别utf-8需要直接写成utf8
SQLALCHEMY_DATABASE_URI = "{}+{}://{}:{}@{}:{}/{}?charset=utf8".format(DIALECT, DRIVER, USERNAME, PASSWORD, HOST,
PORT, DATABASE)
# SQLALCHEMY_DATABASE_URI = f"{DIALECT}+{DRIVER}://{USERNAME}:{PASSWORD}@{HOST}:{PORT}/{DATABASE}?charset=utf8"
SQLALCHEMY_TRACK_MODIFICATIONS = True
# SQLALCHEMY_ECHO = True