After an upgrade to Ubuntu 20.04 LTS, why does mySQL not start?

Solution 1:

After an upgrade to Ubuntu 20.04 LTS, my WordPress site was stuck in Maintenance mode. (This was my 4th machine to upgrade and the first 3 machines upgraded without any glitches.) After checking apache2, I went looking at mySQL. During the install, I had glimpsed a red failure in the middle of Ubuntu 20.04 upgrade churn but there was no way to go back and see what it had said... So I tailed the mySQL logs and it appeared that mySQL was trying repeatedly to start itself. It kept repeating the same 10 lines every couple seconds. The only line that seemed to be problematic was the unknown variable line. So I sent looking for that variable ....

I found query_cache_limit and removed it from the /etc/mysql/my.cnf file. As soon as I removed it, the error log changed to a query_cache_size one so I removed that one too from my.cnf file. Within seconds, mySQL restarted successfully and I was back in business.

# * Query Cache Configuration
#
query_cache_limit = 1M  
query_cache_size        = 16M 
#
# * Logging and Replication
#

Postmortem: Don't know how long these parameters have been present, or if I introduced them (I suspect I did), because this VPS has been running for 6+ years. Removing them got mySQL running again. I still don't know why mySQL choked on them - seems that they could have easily just ignored them. Hope this is a help to someone else as there is presently precious little about this particular error.

[email protected]_server:~# mysql -V
mysql  Ver 8.0.22-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))