TL;DR: If mysqld
fails to start after running brew upgrade
, try re-running the upgrade process manually.
A few weeks ago I went to install something via Homebrew, and it bugged me to run brew upgrade
first, so I did, without really thinking about the consequences.
That upgraded all of the installed packaged to their latest versions, including jumping to new major versions.
I didn’t notice any big problems at the time, but after rebooting my computer today, I noticed that the MySQL service wasn’t running anymore. I checked the error log, and a lot of errors like these:
<br> 2018-07-19T15:45:04.652847Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfBadLeechers is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.652872Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfBadLeechers<br> 2018-07-19T15:45:04.653695Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfBlockedCommentLog is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.653716Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfBlockedCommentLog<br> 2018-07-19T15:45:04.654644Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfBlockedIPLog is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.654664Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfBlockedIPLog<br> 2018-07-19T15:45:04.655657Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfBlocks is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.655677Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfBlocks<br> 2018-07-19T15:45:04.656875Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfBlocks7 is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.656895Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfBlocks7<br> 2018-07-19T15:45:04.658150Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfBlocksAdv is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.658170Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfBlocksAdv<br> 2018-07-19T15:45:04.658952Z 2 [ERROR] [MY-012083] [InnoDB] InnoDB: Table regolith@002elocalhost/wp_wfConfig is not found in InnoDB dictionary<br> 2018-07-19T15:45:04.658972Z 2 [ERROR] [MY-010767] [Server] Error in fixing SE data for regolith.localhost.wp_wfConfig</p> <p>[...]</p> <p>2018-07-19T15:45:06.518136Z 0 [ERROR] [MY-010022] [Server] Failed to Populate DD tables.<br> 2018-07-19T15:45:06.518169Z 0 [ERROR] [MY-010119] [Server] Aborting<br>
In my case, I got those errors for all the WordFence tables for several sites, but not all of the sites that have those tables. I tried searching for information on those errors, but didn’t find anything that was helpful.
I then tried running mysqlcheck
, and got an even more ominous error:
<br> > mysqlcheck -uroot -p --repair --all-databases<br> Enter password:<br> mysqlcheck: Error: Couldn't execute 'SHOW DATABASES': The user specified as a definer ('mysql.infoschema'@'localhost') does not exist<br>
Luckily, searching for that error did turn up a solution from Stack Overflow:
<br> > mysql -u root -p<br> mysql> SET GLOBAL innodb_fast_shutdown = 1;<br> mysql> quit;<br> > mysql_upgrade -u root -p<br>
After running that and restarting the service, everything was working normally again.
Sequel Pro crashing
On a related note, Sequel Pro v1.1.2 will crash when opening a MySQL 8 database. As of August 2018, that’s only fixed in the nightly builds.
Thank you Ian.
I am having the same issue (with WordFence tables!). In my case though, I can’t do anhy of the commands because I keep getting:
`ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’ (2)`
This is with the service started or stopped.
I am trying a downgrade to 5.7.
Please see if you have mysql 5.6 data files as well. It would be that on your disk, you have 5.6 and 5.7 data files and upgrade is failing for particular data files.