MySQL server has gone away. Nextcloud ignoring database configuration in `config.php`

I solved it. It was a permission issue. The update changed the owner of /etc/webapps/nextcloud and /var/lib/nextcloud to nextcloud:nextcloud but php was running as http. This is one of the first things I tried, but I missed one directory so it still errored out so I assumed it was something else and went down a different path.

Once I fixed the owners, I moved config.php and nextcloud did its initial setup. I put in the database information, but the wizard failed because my user already exists (duh it’s an existing install that you borked). I went into config.php and added 'installed' => true and everything works.