Time Machine to the Rescue

When MariaDB went into a tailspin, I spent hours trying to understand the InnoDB error that emerged, likely because of corruption in the database. Best guess, some write error to phpservermon table due to cron function that was writing during a restart or crash.

So, trying to fix the error was fruitless and going nowhere. I couldn’t get the SQL engine to start, no matter what the process or changes to mysql.cnf. The event went to the point of MariaDB reinstall.

It was then that I realized that Time Machine might be my friend. Since this is not a high use site, recovering databases would be simple, right?

So, I headed over to /usr/local/var and, thanks to HomeBrew, eureka! Time Machine had dutifully backed up for over three weeks and beyond. Recover the MySQL folder in its entirety and everything back up and running except for one database. Not sure why on the database, but deleted everything in the offending directory and then used Sequel Pro to delete the database from the directory. Then run mysqlcheck -A and all gets OK. Reload WordPress and update to 5.3, upgrade the database and all is good with the world.

I make it sound easy, but this was a few hours work in between things trying to search the internet for solutions for naught — and trying more than a few tinkering options. So, we are updated and living high on the internet hog with Catalina 10.15.2 and Homebrew bubbling along with it.

Catalina was a struggle, but I’m here

Was difficult getting Homebrew stable on Catalina after upgrade to 10.15. My greatest hurdle was mysql (mariadb). Ended up having to delete mysql entirely and reinstall.

May have been:

  • forgot to run mysql_upgrade on previous iteration – that messed up some key tables in mysql database
  • something messed up socket and re-installation mucked this up requiring rm -rf of the socket to clean things up.
  • needed update to mariadb that I didn’t catch – still a few bugs in homebrew that I noted in updates

So, what I did:

  • got it running long enough to dump my databases to safe folder – Innodb safe mode = 2
  • deleted everything – all folders associated with mysql at all levels
  • service uninstall in brew
  • remove remaining files across system
  • service reinstall in brew
  • reset root password on newly reinstalled maraidb
  • Used Sequel Pro to return databases from sql files
  • restarted everything

And…. except for a few password issues, up and running again. Frustrating and took two days, but got it figured out.

Still may have remaining issue on wordpress and my ssl installation. I’ll have to go back and check getgrav documentation on Catalina upgrade.

SSL!!

Finally got SSL working. Required checking the sequence again on getgrav site that has been my key journey partner.

https://getgrav.org/blog/macos-mojave-apache-ssl

For the fun of it, I also loaded a home-brew cask for Java8. Don’t know what I will do with that yet, but expect that some java coding will need it down the line.

Had an error on brew update/upgrade tonight that has caused problems. And, I still see the cxx11 errors cropping up in brew doctor check. But, this doesn’t seem to affect my PHP 7.2 installation. 7.3 is now installed, but no idea how or when to enable. Will have to wait and see.

In the meantime, got Emily’s site moved to local server in subdirectory and installed fresh zurfluh.net wordpress site. Again, now wondering what I will do with that. Did enjoy moving it to a Linux core and getting off windows once and for all.

Sierra finally installed and home page fixed….

What a nightmare.  Had to recompile and reconstruct databases and then recover tables from Time Machine.  Multiple pages trying to figure out MySQL issue, including InnoDB reports that I had corrupted database.  Frustrating was an understatement.  I seemed to have three versions of MySQL running.  Finally got things removed and proper things reinstalled and then, out of nowhere it started working again.  Seems like some of the errors caused by leftover error files in the MySQL directory.  Once they were deleted and restart, all was well. Homebrew wasn’t helping much.  I had to back down PHP to 5.6 (7.2 may have been part of the problem.

I now seem to have all of the High Sierra transition issues resolved, including needing to restart in recovery to disable system integrity checking that was keeping an errant file in the trash with no way of purging it.  Once that file was gone, system seemed to return to normal stability.  Reinstated the integrity checking and all is well.

I enjoy Homebrew, but the troubleshooting can be painful at times.