TryGhost / Ghost

Independent technology for modern publishing, memberships, subscriptions and newsletters.
https://ghost.org
MIT License
46.27k stars 10.11k forks source link

Added innodb_force_recovery config to local mysql #20507

Open allouis opened 1 week ago

allouis commented 1 week ago

ref https://dev.mysql.com/doc/refman/8.4/en/forcing-innodb-recovery.html

Docker on MacOS can sometimes force quit the container and we end up with a broken MySQL container which can't boot. This config forced MySQL to attempt to recover the DB. The value of 6 is suggested by the logs when MySQL breaks - but this will open InnoDB in a readonly mode, which isn't suitable for us.

I think we wanna have a way to run this just once, and then exit, maybe with like yarn recover-db