如何修复Mariadb Innodb“数据结构损坏”使用Plesk系统重新启动后
我使用SSH登录服务器,并说我的服务器需要重新启动。因此,我登录了我的Plesk面板,然后击中重新启动服务器按钮。重新启动后... MySQL/Mariadb不再启动。我遇到的错误似乎表明数据库损坏。我非常感谢有关如何解决此问题的一些建议。我不会经常遇到这个问题。
一些网站已经说过要重新安装数据库。其他地方说使用innodb_force_recovery。我没有任何备份(我知道,对我感到羞耻。这是个人服务器。)。我确实有/var/lib/mysql目录的副本。尽管在数据库停止启动后拍摄副本。
OS:Ubuntu 20.04LTS
"journal -xe" outputs this info:
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
[Note] InnoDB: Uses event mutexes
[Note] InnoDB: Compressed tables use zlib 1.2.11
[Note] InnoDB: Number of pools: 1
[Note] InnoDB: Using SSE2 crc32 instructions
[Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man pa>
[ERROR] InnoDB: Invalid flags 0x4000 in ./ibdata1
[ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
[Note] InnoDB: Starting shutdown...
Apr 16 12:45:41 mysite.com named[1988]: client @0x7feec0011480 1.2.3.4#68 (sl): query (cache) 'sl/ANY/IN' denied
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
Apr 16 12:45:41 mysite.com systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Apr 16 12:45:41 mysite.com systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Apr 16 12:45:41 mysite.com systemd[1]: Failed to start MariaDB 10.3.34 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 9726 and the job result is failed.
I logged into the server using SSH and it said my server needed to have a reboot. So I logged into my plesk panel and hit the restart server button. After the reboot... MySQL/MariaDB doesn't start anymore. I'm getting errors that seem to indicate database corruption. I would really appreciate some advice on how to fix this issue. I don't encounter this problem very often.
Some sites have said to reinstall the database. Other places have said to use innodb_force_recovery. I do not have any backups (I know, Shame on me. This is a personal server.). I DO have a copy of the /var/lib/mysql directory. Though the copy is taken AFTER the database stopped booting.
OS: Ubuntu 20.04LTS
"journal -xe" outputs this info:
[Note] InnoDB: Using Linux native AIO
[Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
[Note] InnoDB: Uses event mutexes
[Note] InnoDB: Compressed tables use zlib 1.2.11
[Note] InnoDB: Number of pools: 1
[Note] InnoDB: Using SSE2 crc32 instructions
[Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
[Note] InnoDB: Completed initialization of buffer pool
[Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man pa>
[ERROR] InnoDB: Invalid flags 0x4000 in ./ibdata1
[ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
[Note] InnoDB: Starting shutdown...
Apr 16 12:45:41 mysite.com named[1988]: client @0x7feec0011480 1.2.3.4#68 (sl): query (cache) 'sl/ANY/IN' denied
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting
Apr 16 12:45:41 mysite.com systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- An ExecStart= process belonging to unit mariadb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Apr 16 12:45:41 mysite.com systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- The unit mariadb.service has entered the 'failed' state with result 'exit-code'.
Apr 16 12:45:41 mysite.com systemd[1]: Failed to start MariaDB 10.3.34 database server.
-- Subject: A start job for unit mariadb.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- A start job for unit mariadb.service has finished with a failure.
--
-- The job identifier is 9726 and the job result is failed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论