gpt4 book ai didi

mysql - 如何修复 InnoDB 损坏的数据结构?

转载 作者:行者123 更新时间:2023-12-04 19:30:38 25 4
gpt4 key购买 nike

我删除了 mysql 并安装了 mariadb,我想删除 mysql 会破坏 InnoDB(我是新手)。

InnoDB: Plugin initialization aborted with error Data structure corruption

完整日志:

    -- Subject: Unit mariadb.service has begun start-up
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit mariadb.service has begun starting up.
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] /usr/sbin/mariadbd (mysqld 10.5.8-MariaDB) starting as process 6137 ...
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Warning] Could not increase number of max_open_files to more than 16384 (request: 32183)
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Using Linux native AIO
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Uses event mutexes
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Number of pools: 1
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Completed initialization of buffer pool
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed>
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [ERROR] InnoDB: Invalid flags 0x4800 in ./ibdata1
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
Jan 16 18:25:55 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:55 0 [Note] InnoDB: Starting shutdown...
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:56 0 [ERROR] Plugin 'InnoDB' init function returned error.
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:56 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:56 0 [Note] Plugin 'FEEDBACK' is disabled.
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:56 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be n>
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:56 0 [ERROR] Unknown/unsupported storage engine: InnoDB
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC mariadbd[6137]: 2021-01-16 18:25:56 0 [ERROR] Aborting
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC systemd[1]: mariadb.service: Main process exited, code=exited, status=1/FAILURE
Jan 16 18:25:56 CentOSVPS1.DylanMediaPC systemd[1]: mariadb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support

Edit1:根据下面的帖子,曾经被称为“插件”的 InnoDB 实现包含在 mysql 中,我假设是 mariadb。那么我应该重新安装 mariadb 来修复 innodb 吗?

https://dev.mysql.com/doc/refman/5.5/en/innodb-installation.html

When you use the InnoDB storage engine 1.1 and above, with MySQL 5.5 and above, you do not need to do anything special to install: everything comes configured as part of the MySQL source and binary distributions.

Edit2:我在安装 mariadb、删除 mysql 和安装 mysql 时使用了 yum history undo。然后安装了 mariadb。这并没有解决问题,但确实清理了一些未使用的 mysql 依赖项。

Edit3:下面帖子中的以下命令解决了我的问题:

sudo rm -rf /var/lib/mysql/*
sudo mysql_install_db -u mysql

https://dba.stackexchange.com/questions/275885/innodb-failing-to-start-mysql-not-loading-plugins

最佳答案

Edit3:下面帖子中的以下命令解决了我的问题:

sudo rm -rf /var/lib/mysql/*
sudo mysql_install_db -u mysql

https://dba.stackexchange.com/questions/275885/innodb-failing-to-start-mysql-not-loading-plugins

关于mysql - 如何修复 InnoDB 损坏的数据结构?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65753443/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com