refactor: 移除对 MySQL 的支持,更新文档和配置以仅支持 SQLite 和 PostgreSQL
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[inner]
|
||||
version = "7.9.5"
|
||||
version = "7.9.6"
|
||||
|
||||
#----以下是给开发人员阅读的,如果你只是部署了MoFox-Bot,不需要阅读----
|
||||
#如果你想要修改配置文件,请递增version的值
|
||||
@@ -12,30 +12,11 @@ version = "7.9.5"
|
||||
#----以上是给开发人员阅读的,如果你只是部署了MoFox-Bot,不需要阅读----
|
||||
|
||||
[database]# 数据库配置
|
||||
database_type = "sqlite" # 数据库类型,支持 "sqlite"、"mysql" 或 "postgresql"
|
||||
database_type = "sqlite" # 数据库类型,支持 "sqlite" 或 "postgresql"
|
||||
|
||||
# SQLite 配置(当 database_type = "sqlite" 时使用)
|
||||
sqlite_path = "data/MaiBot.db" # SQLite数据库文件路径
|
||||
|
||||
# MySQL 配置(当 database_type = "mysql" 时使用)
|
||||
mysql_host = "localhost" # MySQL服务器地址
|
||||
mysql_port = 3306 # MySQL服务器端口
|
||||
mysql_database = "maibot" # MySQL数据库名
|
||||
mysql_user = "root" # MySQL用户名
|
||||
mysql_password = "" # MySQL密码
|
||||
mysql_charset = "utf8mb4" # MySQL字符集
|
||||
mysql_unix_socket = "" # MySQL Unix套接字路径(可选,用于本地连接,优先于host/port)
|
||||
|
||||
# MySQL SSL 配置
|
||||
mysql_ssl_mode = "DISABLED" # SSL模式: DISABLED, PREFERRED, REQUIRED, VERIFY_CA, VERIFY_IDENTITY
|
||||
mysql_ssl_ca = "" # SSL CA证书路径
|
||||
mysql_ssl_cert = "" # SSL客户端证书路径
|
||||
mysql_ssl_key = "" # SSL客户端密钥路径
|
||||
|
||||
# MySQL 高级配置
|
||||
mysql_autocommit = true # 自动提交事务
|
||||
mysql_sql_mode = "TRADITIONAL" # SQL模式
|
||||
|
||||
# PostgreSQL 配置(当 database_type = "postgresql" 时使用)
|
||||
postgresql_host = "localhost" # PostgreSQL服务器地址
|
||||
postgresql_port = 5432 # PostgreSQL服务器端口
|
||||
@@ -50,7 +31,7 @@ postgresql_ssl_ca = "" # SSL CA证书路径
|
||||
postgresql_ssl_cert = "" # SSL客户端证书路径
|
||||
postgresql_ssl_key = "" # SSL客户端密钥路径
|
||||
|
||||
# 连接池配置(MySQL 和 PostgreSQL 有效)
|
||||
# 连接池配置(PostgreSQL 有效)
|
||||
connection_pool_size = 10 # 连接池大小
|
||||
connection_timeout = 10 # 连接超时时间(秒)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user