报错如下:
[ERROR] Found 1 prepared transactions! It means that mysqld was not shut down properly last time and critical recovery information (last binlog or tc.log file) was manually deleted after a crash. You have to start mysqld with --tc-heuristic-recover switch to commit or rollback pending transactions.
配置文件加了:innodb_force_recovery = 1 Google 了下都让使用如下命令,恢复不成功
mysqld_safe --tc-heuristic-recover=COMMIT
1
defunct9 2020-04-15 11:04:33 +08:00
开 ssh,让我上去看看
|
4
sprite82 2020-04-15 12:48:11 +08:00 via Android
不是很理解为什么数据库也要放 docker 中
|
5
littlewing 2020-04-15 12:49:34 +08:00
恢复不成功报什么错?
|
9
magicdu OP @littlewing 感谢回复,数据已经恢复了,把 data 数据文件拷出来了在本地恢复的,容器里不好搞,报了个这样的错 [ERROR] Fatal error: Can't open and lock privilege tables: 'mysql.user' is not of type 'TABLE'。
之后用下面的命令启动起来了 ``` /usr/sbin/mysqld --skip-grant-tables --general-log & ``` 然后把数据搞出来了,感觉稀里糊涂的还是。 |
10
xfriday 2020-04-15 13:41:50 +08:00
手动删掉那个 prepared transaction
|
13
neroxps 2020-04-15 14:51:42 +08:00
楼主 docker -v 没用???数据库文件直接在容器内部???勇气可嘉
docker rm -f 不就 GG 了? |
14
idealhs 2020-04-15 17:15:34 +08:00 1
这楼里互动属实给我看笑了😂
|