家里一直用gogs,占用资源少,之前用的是0.12.6,今天迁移顺带升级到12.10,但是突然发现,无法启动,报错
2022/10/16 03:06:19 [FATAL] [...o/gogs/internal/route/install.go:75 GlobalInit()] Failed to initialize ORM engine: open database: failed to connect to `host=192.168.xx.3 user=gogs database=gogs`: failed to receive message (EmptyQueryResponse body must have length of 0, but it is 6)
后来GG后找到一篇帖子,发现是新版的配置文件发生了变化
# app.ini 旧版
[database]
DB_TYPE = mysql
HOST = 192.168.xx.3:3307
NAME = gogs
USER = gogs
PASSWD = gogsxxxxxxxx
SSL_MODE = disable
PATH = data/gogs.db
# app.ini 新版
[database]
TYPE = mysql
HOST = 192.168.xx.3:3307
NAME = gogs
USER = gogs
PASSWORD = gogsxxxxxxxx
SSL_MODE = disable
PATH = data/gogs.db