Nextcloud snap MySQL InnoDB recovery

I am having an issue with Nextcloud snap instance and after working through several steps to fix, I am finally at an impass and I am unable to proceed.

The root issue was: MySQL was not starting correctly due to corrupt log files, so I removed those so they could be recreated

sudo rm /var/snap/nextcloud/current/mysql/ib_logfile0
sudo rm /var/snap/nextcloud/current/mysql/ib_logfile1

The problem is that I cannot set the “innodb_force_recovery=4” per the instructions in the links below.


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

Any thoughts on how I can force innodb recovery in the snap?

@ndawg22
Did you ever find a solution?
I seem to have the same issue now.
MySQL on a Nextcloud Snap crashed and MySQL is not able to automatically recover from a crash.
So setting the force recovery entries in my.cnf would be the right answer, but since my.cnf lies on a read-only file system in that Snap, that’s not possible…

I ended up saving my files off, blowing away the snap, and reinstalling the snap. I only had 2 users at the time, so reconfiguring and uploading the files was easy enough. Now I take regular backups using the snap’s MySQL dump functionality I’m case it happens again.