Closed hdm9527 closed 1 year ago
这是 Flamego Session 中间件的一个老问题了。 在使用 MySQL 数据库存储 Session 时不会自动创建表,需要手动执行如下语句创建:
CREATE TABLE `sessions` (
`key` varchar(255) NOT NULL,
`data` blob NOT NULL,
`expired_at` datetime NOT NULL,
PRIMARY KEY (`key`)
)
不过现在已经支持存储 Session 至 Redis 了,目前线上也是这样做的。
不过现在已经支持存储 Session 至 Redis 了,目前线上也是这样做的。
我先跑起来看看,有装Redis
这是 Flamego Session 中间件的一个老问题了。 在使用 MySQL 数据库存储 Session 时不会自动创建表,需要手动执行如下语句创建:
CREATE TABLE `sessions` ( `key` varchar(255) NOT NULL, `data` blob NOT NULL, `expired_at` datetime NOT NULL, PRIMARY KEY (`key`) )
跑起来了,谢谢
配置文件 数据库