1

I'm using MacOS Monterey 12.6.1 with Homebrew 3.6.6 and MariaDB 10.8.3

The OS crashed out of nowhere and rebooted itself. After the reboot I was unable to connect to the database: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Current results of "mysqld" command:

[Note] mysqld (server 10.8.3-MariaDB) starting as process 12300 ...
[Warning] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case 
[Note] InnoDB: Compressed tables use zlib 1.2.11
[Note] InnoDB: Number of transaction pools: 1
[Note] InnoDB: Using generic crc32 instructions
[Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
[Note] InnoDB: Completed initialization of buffer pool
[ERROR] InnoDB: Upgrade after a crash is not supported. The redo log was created with MariaDB 
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[Note] InnoDB: Starting shutdown...
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

And the error log is as follows:

mysqld_safe mysqld from pid file /opt/homebrew/var/mysql/crtx.pid ended
mysqld_safe Starting mariadbd daemon with databases from /opt/homebrew/var/mysql
[Note] /opt/homebrew/Cellar/mariadb/10.8.3_1/bin/mariadbd (server 10.8.3-MariaDB) starting as process 9036 ...
[Warning] Setting lower_case_table_names=2 because file system for /opt/homebrew/var/mysql/ is case insensitive
[Note] InnoDB: !!! innodb_force_recovery is set to 1 !!!
[Note] InnoDB: Compressed tables use zlib 1.2.11
[Note] InnoDB: Number of transaction pools: 1
[Note] InnoDB: Using generic crc32 instructions
[Note] InnoDB: Initializing buffer pool, total size = 128.000MiB, chunk size = 2.000MiB
[Note] InnoDB: Completed initialization of buffer pool
[ERROR] InnoDB: File ./ib_logfile0 was not found
[ERROR] InnoDB: Plugin initialization aborted with error Generic error
[Note] InnoDB: Starting shutdown...
[ERROR] Plugin 'InnoDB' init function returned error.
[ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
[Note] Plugin 'FEEDBACK' is disabled.
[ERROR] Unknown/unsupported storage engine: InnoDB
[ERROR] Aborting

I upgraded to the new MariaDB version via Homebrew but it didn't work because it was corrupted. As far as I understand it is not possible to downgrade to its' original version anymore.

I tried the ib_logfile* deletion method but it didn't work. I tried to fix it by giving "innodb_force_recovery=1 / 2 / 3" parameters in my.cnf, the result is frustration again.

I have 1 month of work inside and I don't have up-to-date backup (I know this is stupid, lesson learned!)

Is there any way to fix the server and get it working again?

Or at least recover the database inside? That way I can do a clean install and create the tables again...

I will be waiting for your help. Thank you very much in advance!

0

1 Answer 1

1

I upgraded to the new MariaDB version via Homebrew

but it didn't work because it was corrupted.

No, the error didn't say that. You needed to downgrade to the 10.7 version (from your locked SO duplicate post) that was the version of the redo log and do a clean shutdown.

As far as I understand it is not possible to downgrade to its' original version anymore.

It was supported, but it detected it couldn't proceed and as such didn't start a recovery. As such nothing was changed and it was salvageable. Until...

I tried the ib_logfile* deletion method but it didn't work

Please comment on all the sites that recommend this and tell them to stop causing users pain.

You did keep a copy right? Move it back, downgrade and start a 10.7 instance and let it cleanly shutdown.

1
  • No backup at all.
    – Rawkon
    Commented Nov 1, 2022 at 18:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.