1

I am currently unable to restart [what I thought was] a previously working version of mariadb. Rocky Linux 8.6 server crashed during yum update and became unbootable. I installed Rocky Linux 9.3 and reinstalled mariadb and mariadb-server. Mariadb now fails to start on previous data directory with:

% systemctl start mariadb

2024-03-29 15:24:37 0 [Note] Starting MariaDB 10.5.22-MariaDB source revision 7e650253dc488debcb0898ebe6d385bf6dfa3656 as process 1971547
2024-03-29 15:24:37 0 [Note] InnoDB: Uses event mutexes
2024-03-29 15:24:37 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-03-29 15:24:37 0 [Note] InnoDB: Number of pools: 1
2024-03-29 15:24:37 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-03-29 15:24:37 0 [Note] InnoDB: Using Linux native AIO
2024-03-29 15:24:37 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2024-03-29 15:24:37 0 [Note] InnoDB: Completed initialization of buffer pool
2024-03-29 15:24:37 0 [ERROR] InnoDB: MySQL-8.0 tablespace in ./ibdata1
2024-03-29 15:24:37 0 [ERROR] InnoDB: Restart in MySQL for migration/recovery.
2024-03-29 15:24:37 0 [ERROR] InnoDB: Plugin initialization aborted with error Unsupported
2024-03-29 15:24:37 0 [Note] InnoDB: Starting shutdown...
2024-03-29 15:24:37 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-03-29 15:24:37 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-03-29 15:24:37 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-03-29 15:24:37 0 [ERROR] Aborting

I have attempted innodb_force_recovery from 1 to 6, to no avail. What would you recommend? Thank you.

jlm
  • 21
  • 4

2 Answers2

1

"InnoDB: MySQL-8.0 tablespace in ./ibdata1" means that the previous data directory was MySQL-8.0(+). MariaDB cannot read the data in these InnoDB files.

If you had MySQL-8.0 in those files, run a mysql:8.0 on that datadir passing it as a /var/lib/mysql volume, take a mysqldump of the database, and import that into MariaDB.

If there is no data previously;

  1. rm -rf /var/lib/mysql/*
  2. sudo mariadb-install-db -u mysql /var/lib/mysql
  3. systemctl start mariadb.service
danblack
  • 8,258
  • 2
  • 12
  • 28
1

Thank you, danblack, you nailed it.

I removed mariadb and installed mysql

sudo rm -r -f /var/lib/mysql

sudo dnf remove mariadb

sudo dnf install mysql mysql-server

mysql --version

mysql Ver 8.0.36 for Linux on x86_64 (Source distribution)

sudo systemctl start mysqld

Then I edited /etc/my.cnf.d/mysql-server.cnf to point to my data directory and restarted the mysql server. I was able to recover access to my tables. I am running the mysqldumps as suggested and will import into mariadb.

tinlyx
  • 3,810
  • 14
  • 50
  • 79
jlm
  • 21
  • 4