Obi-Wan-Clemobi
Obi-Wan-Clemobi

Reputation: 177

Homebrew MariaDB 10.4.13 not found - forced updated to 10.5.5 and now I cannot start my database

I am unable to find MariaDB version 10.4.13 using brew. After reinstalling by uninstalling and installing (critical mistake) Homebrew upgraded my version to 10.5.5

Now I am getting the following error:

020-08-14 20:33:07 0 [Note] InnoDB: Uses event mutexes

2020-08-14 20:33:07 0 [Note] InnoDB: Compressed tables use zlib 1.2.11

2020-08-14 20:33:07 0 [Note] InnoDB: Number of pools: 1

2020-08-14 20:33:07 0 [Note] InnoDB: Using SSE4.2 crc32 instructions

2020-08-14 20:33:07 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728

2020-08-14 20:33:07 0 [Note] InnoDB: Completed initialization of buffer pool

2020-08-14 20:33:07 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.13.

2020-08-14 20:33:07 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error

2020-08-14 20:33:07 0 [Note] InnoDB: Starting shutdown...

2020-08-14 20:33:07 0 [ERROR] Plugin 'InnoDB' init function returned error.

2020-08-14 20:33:07 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

2020-08-14 20:33:07 0 [Note] Plugin 'FEEDBACK' is disabled.

2020-08-14 20:33:07 0 [ERROR] Unknown/unsupported storage engine: InnoDB

2020-08-14 20:33:07 0 [ERROR] Aborting

Any help would be greatly appreciated. I have still have my datadir somewhere outside of the /var/log/mysql.

Upvotes: 2

Views: 2434

Answers (2)

danblack
danblack

Reputation: 14711

The error message 2020-08-14 20:33:07 0 [ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 10.4.13. is the key aspect.

What has happened is the server has crashed (force killed by either the user or the OS), and when the new version was installed it doesn't recognise the old redo log format.

The solution is to start a MariaDB-10.4 instance on the same data directory and then shut it down cleanly. Cleanness can be identified by seeing "Shutdown complete" as the last message in the logs.

After than, you can start any newer version of MariaDB on the same datadir.

As downgrading is potentially difficult in some packaging systems, you should with the right permissions run the mariadb:10.4 Docker Official Image container using the same datadir as the volume /var/lib/mysql and achieve the same thing.

Do not go deleting Innodb or Aria files. They store changes that haven't been written to the table space and potentially internal changes. You can quite easily get a corrupted database by removing them. And in 10.11+, it won't start without those files to highlight was a bad choice in deleting them was made.

Upvotes: 0

spike 王建
spike 王建

Reputation: 1714

The only way I found round this was to backup my /var/lib/mysql and /var/lib/mariadb directories by renaming them, then creating them as empty directories. I'm aware this isn't an option for many, if you're still in development and working on seed data this should work for you.

There has been some talk about just removing log files from these directories and thus preserving data though I haven't tried this.

Log files reportedly removed that fixed this issue:

/var/lib/mysqld/ib_logfile0
/var/lib/mysql/ib_logfile1
/var/lib/mysql/aria_log_control

referenced from https://github.com/laradock/laradock/issues/93

Upvotes: 4

Related Questions