centos 7 修复mysql,centos mysql /mariadb非正常关闭导致数据库损坏的恢复

昨天在进行网站用户维护的时候,发现网站无法登陆,发现是后台mysql没有启动。

反复重启服务器无果,手动启动mysql

service mysql start

提示

Starting MySQL..The server quit without updating PID file (/usr/local/mysql/var/www.mydomain.com.pid).[FAILED]

搜索了一下 Starting MySQL..The server quit without updating PID file 相关的信息,尝试了一些方法无效,似乎也不对症。

于是查看log:

tail -f -n 100 /usr/local/mysql/var/www.mydomain.com.err

看到如下信息:

181113 12:23:09 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var

181113 12:23:09 [Note] /usr/local/mysql/bin/mysqld (mysqld 5.5.48) starting as process 1204 …

181113 12:23:09 [Note] Plugin ‘FEDERATED’ is disabled.

181113 12:23:09 InnoDB: The InnoDB memory heap is disabled

181113 12:23:09 InnoDB: Mutexes and rw_locks use GCC atomic builtins

181113 12:23:09 InnoDB: Compressed tables use zlib 1.2.3

181113 12:23:09 InnoDB: Initializing buffer pool, size = 16.0M

181113 12:23:09 InnoDB: Completed initialization of buffer pool

181113 12:23:09 InnoDB: highest supported file format is Barracuda.

InnoDB: Log scan progressed past the checkpoint lsn 8659431036

181113 12:23:09 InnoDB: Database was not shut down normally!

InnoDB: Starting crash recovery.

InnoDB: Reading tablespace information from the .ibd files…

InnoDB: Restoring possible half-written data pages from the doublewrite

InnoDB: buffer…

InnoDB: Doing recovery: scanned up to log sequence number 8659436630

InnoDB: Error: trying to access page number 3489660288 in space 0,

InnoDB: space name /usr/local/mysql/var/ibdata1,

InnoDB: which is outside the tablespace bounds.

InnoDB: Byte offset 0, len 16384, i/o type 10.

InnoDB: If you get this error at mysqld startup, please check that

InnoDB: your my.cnf matches the ibdata files that you have in the

InnoDB: MySQL server.

181113 12:23:09 InnoDB: Assertion failure in thread 140223550441248 in file fil0fil.c line 4578

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.

04:23:09 UTC – mysqld got signal 6 ;

This could be because you hit a bug. It is also possible that this binary

你可能感兴趣的:(centos,7,修复mysql)