title: how to fix InnoDB corrupted data structure?
body: <p>I removed mysql and installed mariadb, I guess removing mysql broke InnoDB (I'm new to this).</p>
  <pre><code>InnoDB: Plugin initialization aborted with error Data structure corruption
  </code></pre>
  <p>Full Log:</p>
  <pre><code>    -- 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&gt;
  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: &quot;Table 'mysql.plugin' doesn't exist&quot;. Some plugins may be n&gt;
  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
  </code></pre>
  <p>Edit1: According to the post below, the InnoDB implementation which used to be known as the &quot;plugin&quot; is included with mysql, and mariadb I'm presuming. So should I just reinstall mariadb to fix innodb?</p>
  <p><a href="https://dev.mysql.com/doc/refman/5.5/en/innodb-installation.html" rel="nofollow noreferrer">https://dev.mysql.com/doc/refman/5.5/en/innodb-installation.html</a></p>
  <blockquote>
  <p>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.</p>
  </blockquote>
  <p>Edit2: I used <code>yum history undo</code> on the install of mariadb, the removal of mysql and the install of mysql. Then installed mariadb. This didn't fix the problem but did clean up some unused mysql dependencies.</p>
  <p>Edit3: The following commands from the post below solved my problem:</p>
  <pre><code>sudo rm -rf /var/lib/mysql/*
  sudo mysql_install_db -u mysql
  </code></pre>
  <p><a href="https://dba.stackexchange.com/questions/275885/innodb-failing-to-start-mysql-not-loading-plugins">https://dba.stackexchange.com/questions/275885/innodb-failing-to-start-mysql-not-loading-plugins</a></p>