1
  • OSX Sonoma, OSX Monterey
  • Latest MariaDB from Homebrew (11.4.2-MariaDB, client 15.2 for osx10.17 (x86_64))

MariaDB won't start every time I restart the brew service or restart the computer. I experienced it on Sonoma (with OpenCore Legacy Patcher) and fresh native Monterey.

240611 01:27:33 mysqld_safe mysqld from pid file /usr/local/var/mysql/penyo.local.pid ended
240611 01:27:43 mysqld_safe Starting mariadbd daemon with databases from /usr/local/var/mysql
2024-06-11  1:27:43 0 [Note] Starting MariaDB 11.4.2-MariaDB source revision 3fca5ed772fb75e3e57c507edef2985f8eba5b12 as process 6983
2024-06-11  1:27:43 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2024-06-11  1:27:43 0 [Note] InnoDB: Number of transaction pools: 1
2024-06-11  1:27:43 0 [Note] InnoDB: Using crc32 + pclmulqdq instructions
2024-06-11  1:27:43 0 [Note] InnoDB: Initializing buffer pool, total size = 2.000GiB, chunk size = 32.000MiB
2024-06-11  1:27:43 0 [Note] InnoDB: Completed initialization of buffer pool
2024-06-11  1:27:43 0 [ERROR] InnoDB: Missing FILE_CHECKPOINT(1170899079) at 1170899079
2024-06-11  1:27:43 0 [ERROR] InnoDB: Log scan aborted at LSN 1170899079
2024-06-11  1:27:43 0 [ERROR] InnoDB: Plugin initialization aborted with error Generic error
2024-06-11  1:27:43 0 [Note] InnoDB: Starting shutdown...
2024-06-11  1:27:43 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2024-06-11  1:27:43 0 [Note] Plugin 'FEEDBACK' is disabled.
2024-06-11  1:27:43 0 [Note] Plugin 'wsrep-provider' is disabled.
2024-06-11  1:27:43 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2024-06-11  1:27:43 0 [ERROR] Aborting
240611 01:27:43 mysqld_safe mysqld from pid file /usr/local/var/mysql/penyo.local.pid ended

my.cnf

[client-server]
!includedir /usr/local/etc/my.cnf.d

[mysqld]

bind-address = 127.0.0.1
# innodb_force_recovery = 6

[mariadb]
innodb_buffer_pool_size = 2G
innodb_ft_cache_size = 512000000

Steps to reproduce :

Install MariaDB 11.4.2, start brew services, configure sudo mariadb-secure-installation, import the database. All databases are WordPress databases from cPanel hosting. All databases are fine if checked with mariadb-check. The database is also currently installed in cPanel and there are no problems at all.

I have tried importing the database via mysql -u root -p all_db < all_db.sql as well as via phpMyAdmin. Everything was fine before I restarted the service or restarted the computer.

As a precaution, I always backup the /usr/local/var/mysql folder before importing data.

After restarting brew services restart mariadb, MariaDB won't start. The only way is to cleanup all MariaDB files then reinstall, OR replace ib_logfile0 with a fresh backup then MariaDB will run normally. But lots of errors:

2024-06-11 14:00:21 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2024-06-11 14:00:21 0 [Note] InnoDB: Buffer pool(s) load completed at 240611 14:00:21
2024-06-11 14:00:32 16 [ERROR] InnoDB: Page [page id: space=150, page number=2] log sequence number 1496320315 is in the future! Current system log sequence number 48016.
2024-06-11 14:00:32 16 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2024-06-11 14:00:32 16 [ERROR] InnoDB: Page [page id: space=151, page number=2] log sequence number 528233615 is in the future! Current system log sequence number 48016.
2024-06-11 14:00:32 16 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2024-06-11 14:00:32 15 [ERROR] InnoDB: Page [page id: space=154, page number=4] log sequence number 528270232 is in the future! Current system log sequence number 48016.
2024-06-11 14:00:32 15 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.
2024-06-11 14:02:17 43 [ERROR] InnoDB: Page [page id: space=1, page number=2] log sequence number 1542367351 is in the future! Current system log sequence number 48016.
2024-06-11 14:02:17 43 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace but not the InnoDB log files. Please refer to https://mariadb.com/kb/en/library/innodb-recovery-modes/ for information about forcing recovery.

Before restart:

❯ brew services list
Name    Status  User  File
httpd   started penyo ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mariadb started penyo ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

After restart:

❯ brew services list
Name    Status     User  File
httpd   started    penyo ~/Library/LaunchAgents/homebrew.mxcl.httpd.plist
mariadb error  256 penyo ~/Library/LaunchAgents/homebrew.mxcl.mariadb.plist

Ignored the error, tried dropping the database and importing again, then restarting the computer. MariaDB still won't start. And have to replace ib_logfile0 again. So over and over again.

I have also tried exporting data via mariadb-dump when MariaDB was still running normally before restarting, then importing the database, but it still doesn't work. I have also tried it when in recovery mode 6.

I've tried searching for 3 days, but couldn't find anything.

Any suggestion?

1
  • @nbk It's InnoDB. The database working fine at cPanel hosting (MariaDB 10.6). The problem is not database. link
    – Penyo
    Commented Jun 13 at 17:03

3 Answers 3

2

I encountered the same problem, and only a downgrade to [email protected] helped to resolve it. See https://github.com/orgs/Homebrew/discussions/5389#discussioncomment-9701010

1
1

I was having a similar problem, except I was getting [ERROR] InnoDB: Missing FILE_CHECKPOINT(10514035995) at 10514035995. Would completely reinstall mariadb with brew, it would run fine, but after importing some data and rebooting, it would refuse to start.

After three days of debugging, I came across this post — where they recommended trying to start mariadb with mysql.server start and it seems to have fixed the problem for me. I don't know why, but after running that once, mariadb will now start as expected with brew services after restart.

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Jun 27 at 10:50
0

What worked for me is killing all mysql processes, reinstalling, and then setting the root password manually. Note: Don't use pkill except in very rare circumstances.

It was like:

brew stop mariadb
brew services cleanup
sudo pkill -KILL -f mysql mariadb
brew remove mariadb
brew services cleanup
brew install mariadb
/opt/homebrew/opt/mariadb/bin/mysqld_safe --datadir=/opt/homebrew/var/mysql
brew services start mariadb

Then I reset the password because at this point the logs told me that it was returning the access denied error.

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