feat(mysql): 添加MySQL数据库支持

- 在requirements.txt中添加aiomysql依赖
- 在config.toml中添加MySQL配置块
- 新增MySQLModel配置模型
- 实现MySQLManager单例管理器
- 更新Config类以支持MySQL配置加载
- 在__init__.py中导出mysql_manager
- 改进ConfigError异常处理
This commit is contained in:
2026-02-28 16:59:52 +08:00
parent 0bca97424b
commit ed4da64a7a
7 changed files with 203 additions and 13 deletions

View File

@@ -21,13 +21,28 @@ permission_denied_message = "权限不足,需要 {permission_name} 权限"
# Redis 配置
[redis]
# Redis 主机地址
host = "101.36.126.55"
host = "114.66.61.199"
# Redis 端口
port = 6379
port = 37080
# Redis 数据库编号
db = 0
# Redis 密码
password = "redis_5fCmnE"
password = "redis_n7Ke76"
# MySQL 配置
[mysql]
# MySQL 主机地址
host = "114.66.61.199"
# MySQL 端口
port = 42398
# MySQL 用户名
user = "neobot"
# MySQL 密码
password = "neobot"
# MySQL 数据库名称
db = "neobot"
# Docker 配置
[docker]