我有一台安装了DirectAdmin的CentOS 7虚拟机。它曾用于运行MySQL 5.6安装,使用DirectAdmin Custombuild 2.0构建。我想要一些MySQL 5.6中没有的功能(例如JSON操作),所以我使用https://www.tecmint.com/install-latest-mysql-on-rhel-centos-and-fedora/上的指南从MySQL仓库手动安装了MySQL 5.7。
直到几天前,当我需要重建我的Custombuild安装时,它工作正常,它显然用5.6版覆盖了MySQL安装。我没有备份数据库(我知道,真的很蠢,我后悔)。
在Custombuild覆盖之后,我使用相同的指南重新安装了MySQL 5.7。当我现在尝试启动它时,我得到以下内容:
[riccardo@server ~]$ sudo systemctl start mysqld
[sudo] password for riccardo:
Job for mysqld.service failed because the control process exited with
error code. See "systemctl status mysqld.service" and "journalctl
-xe" for details.
/var/log/mysqld.log 中的日志说明如下:
2018-05-27T17:42:02.769069Z 0 [Warning] TIMESTAMP with implicit
DEFAULT value is deprecated. Please use
--explicit_defaults_for_timestamp server option (see documentation for
more details).
2018-05-27T17:42:02.770667Z 0 [Note] /usr/sbin/mysqld (mysqld 5.7.22)
starting as process 31752 ...
2018-05-27T17:42:02.773699Z 0 [Note] InnoDB: PUNCH HOLE support
available
2018-05-27T17:42:02.773726Z 0 [Note] InnoDB: Mutexes and rw_locks use
GCC atomic builtins
2018-05-27T17:42:02.773731Z 0 [Note] InnoDB: Uses event mutexes
2018-05-27T17:42:02.773734Z 0 [Note] InnoDB: GCC builtin
__atomic_thread_fence() is used for memory barrier
2018-05-27T17:42:02.773739Z 0 [Note] InnoDB: Compressed tables use
zlib 1.2.3
2018-05-27T17:42:02.773742Z 0 [Note] InnoDB: Using Linux native AIO
2018-05-27T17:42:02.773999Z 0 [Note] InnoDB: Number of pools: 1
2018-05-27T17:42:02.774100Z 0 [Note] InnoDB: Using CPU crc32
instructions
2018-05-27T17:42:02.775492Z 0 [Note] InnoDB: Initializing buffer pool,
total size = 128M, instances = 1, chunk size = 128M
2018-05-27T17:42:02.783306Z 0 [Note] InnoDB: Completed initialization
of buffer pool
2018-05-27T17:42:02.786037Z 0 [Note] InnoDB: If the mysqld execution
user is authorized, page cleaner thread priority can be changed. See
the man page of setpriority().
2018-05-27T17:42:02.797885Z 0 [ERROR] [FATAL] InnoDB: Table flags are
0 in the data dictionary but the flags in file ./ibdata1 are 0x4000!
2018-05-27 19:42:02 0x7efd82b32740 InnoDB: Assertion failure in
thread 139627284604736 in file ut0ut.cc line 942
因此,看起来InnoDB数据已损坏。我尝试使用
开始[mysqld]
innodb_force_recovery = x
在 /etc/my.cnf 中,值为1-6表示x。这没有用。 至于我的问题:有没有机会恢复数据,无论是否有MySQL的帮助?