如果我能做出适当的SQL dump/backup
我本来会的,但是OS
已过期,只能登录SafeMode
,我无法启动的地方MySQL server
。因此,我只能手动备份文件目录。
- 我有 C:\ProgramData\MySQL\MySQL Server 8.0 的已保存文件副本
- 我有 C:\Program Files\MySQL\MySQL Server 8.0 的已保存文件副本
我现在正在新安装的Windows
并尝试启动这个旧服务器几分钟,以便我可以从Workbench
并做出适当的SQL database dump
我将哪个import
在一个新的MySQL
稍后安装。
因此,将上述文件移动到各自的位置 -Program Files
and ProgramData
.
开放PowerShell
(具有管理员权限)并执行以下操作:
mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0" --console
我得到了一些hundred屏幕上的行包含以下内容:
2020-04-10T05:28:56.725818Z 0 [ERROR] [MY-011972] [InnoDB] Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
2020-04-10T05:28:56.734460Z 0 [ERROR] [MY-011971] [InnoDB] Tablespace 'innodb_undo_001' Page [page id: space=4294967279, page number=5] log sequence number 1339677380 is in the future! Current system log sequence number 19081380.
其次是:
2020-04-10T05:28:56.740834Z 0 [ERROR] [MY-011972] [InnoDB] Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to http://dev.mysql.com/doc/refman/8.0/en/forcing-innodb-recovery.html for information about forcing recovery.
2020-04-10T05:28:56.757259Z 0 [System] [MY-010229] [Server] Starting crash recovery...
2020-04-10T05:28:56.769215Z 0 [System] [MY-010232] [Server] Crash recovery finished.
2020-04-10T05:28:57.695386Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-10T05:28:57.765911Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.13' socket: '' port: 3306 MySQL Community Server - GPL.
2020-04-10T05:28:57.926850Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
太好了,至少它正在运行。
我现在可以connect
but no databases
.
- 我能做什么/我应该如何继续成功地暂时恢复这些数据库?
UPDATE:
从数据目录中删除 innodb_undo_001 和 innodb_undo_002 文件并重新启动。
得到这个:
PS C:\Program Files\MySQL\MySQL Server 8.0\bin> .\mysqld --defaults-file="C:\ProgramData\MySQL\MySQL Server 8.0\my.ini" --console 2020-04-10T05:55:29.555478Z 0 [Warning] [MY-010915] [Server] 'NO_ZERO_DATE', 'NO_ZERO_IN_DATE' and 'ERROR_FOR_DIVISION_BY_ZERO' sql modes should be used with strict mode. They will be merged with strict mode in a future release.
2020-04-10T05:55:29.558313Z 0 [System] [MY-010116] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe (mysqld 8.0.13) starting as process 3028
2020-04-10T05:55:31.394427Z 1 [Warning] [MY-012351] [InnoDB] Tablespace 1, name 'sys/sys_config', file '.\sys\sys_config.ibd' is missing!
2020-04-10T05:55:32.808645Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2020-04-10T05:55:32.856154Z 0 [System] [MY-010931] [Server] C:\Program Files\MySQL\MySQL Server 8.0\bin\mysqld.exe: ready for connections. Version: '8.0.13' socket: '' port: 3306 MySQL Community Server - GPL.
2020-04-10T05:55:32.898055Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060
正在运行但不存在数据库。
尝试了 Innodb-force-recovery 方法 - 什么也没发生。和之前一样。