重启后 Mysql 数据库已损坏

重启后 Mysql 数据库已损坏

我的服务器上正在运行 mysql。它工作正常,直到我重新启动它。重新启动后,我无法启动 mysql,因为:

error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'
Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!

Mysql 没有运行并且没有 mysqld.sock,如果我尝试启动 mysql 后手动创建它,系统会删除套接字。

尝试在安全和正常模式下启动 mysql。尝试使用 innodb_recovery 和 fsck(用于磁盘恢复)。

190510 16:12:38 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended
190510 16:45:44 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
190510 16:45:44 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
190510 16:45:44 [Note] /usr/sbin/mysqld (mysqld 5.5.44-0+deb8u1) starting as process 18287 ...
190510 16:45:44 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
190510 16:45:44 [Note] Plugin 'FEDERATED' is disabled.
190510 16:45:44 InnoDB: The InnoDB memory heap is disabled
190510 16:45:44 InnoDB: Mutexes and rw_locks use GCC atomic builtins
190510 16:45:44 InnoDB: Compressed tables use zlib 1.2.8
190510 16:45:44 InnoDB: Using Linux native AIO
190510 16:45:44 InnoDB: Initializing buffer pool, size = 128.0M
190510 16:45:44 InnoDB: Completed initialization of buffer pool
190510 16:45:44 InnoDB: highest supported file format is Barracuda.
190510 16:45:44  InnoDB: Error: space id and page n:o stored in the page
InnoDB: read in are 4294967295:4294967295, should be 0:1!
190510 16:45:44  InnoDB: Error: page 4294967295 log sequence number 18446744073709551615
InnoDB: is in the future! Current system log sequence number 11153786.
InnoDB: Your database may be corrupt or you may have copied the InnoDB
InnoDB: tablespace but not the InnoDB log files. See
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: for more information.
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 1.
InnoDB: You may have to recover from a backup.
190510 16:45:44  InnoDB: Page dump in ascii and hex (16384 bytes):
 len 16384; hex ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff$
InnoDB: End of page dump
190510 16:45:44  InnoDB: Page checksum 1239623680, prior-to-4.0.14-form checksum 391864832
InnoDB: stored checksum 4294967295, prior-to-4.0.14-form stored checksum 4294967295
InnoDB: Page lsn 4294967295 4294967295, low 4 bytes of lsn at page end 4294967295
InnoDB: Page number (if stored to page already) 4294967295,
InnoDB: space id (if created with >= MySQL-4.1.1 and stored already) 4294967295
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 1.
InnoDB: You may have to recover from a backup.
InnoDB: It is also possible that your operating
InnoDB: system has corrupted its own file cache
InnoDB: and rebooting your computer removes the
InnoDB: error.
InnoDB: If the corrupt page is an index page
InnoDB: you can also try to fix the corruption
InnoDB: by dumping, dropping, and reimporting
InnoDB: the corrupt table. You can use CHECK
InnoDB: TABLE to scan your table for corruption.
InnoDB: See also http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
InnoDB: Ending processing because of a corrupt database page.

190510 16:45:44  InnoDB: Assertion failure in thread 1995788816 in file buf0buf.c line 3623
InnoDB: We intentionally generate a memory trap.
InnoDB: Submit a detailed bug report to http://bugs.mysql.com.
InnoDB: If you get repeated assertion failures or crashes, even
InnoDB: immediately after the mysqld startup, there may be
InnoDB: corruption in the InnoDB tablespace. Please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.5/en/forcing-innodb-recovery.html
InnoDB: about forcing recovery.
13:45:44 UTC - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed,
something is definitely wrong and this may fail.

相关内容