Gentoo Archives: gentoo-user

From: Michael <confabulate@××××××××.com>
To: gentoo-user@l.g.o
Cc: Colleen Beamer <colleen.beamer@×××××.com>
Subject: [gentoo-user] MySQL update could break things
Date: Wed, 11 Mar 2020 13:19:25
Message-Id: 2408154.Lt9SDvczpP@lenovo.localdomain
Colleen posted a message a couple of weeks ago about mysql hanging at boot.  I 
came across the same problem on an old PC a few days ago.

Boot hangs as mysql service is started.

MySQL upgrade from an old 5.7 version to 8.0 has a lot of material changes, 
which require a careful migration plan and pre-emptive steps:


If you have not made a migration plan or taken the steps advised by MySQL 
devs, then rebooted a headless server following your thoughtless mysql 
installation upgrade and started scratching your head wondering why your 
remote system has not come up, I can advise as follows.

1. Go make, then enjoy a leisurely cuppa.
2. About 15 minutes later try to login again.  The mysql attempt to restart 
the service should have timed out and the boot process will eventually 
continue and complete.
3. Remove mysql from the default run service to make the next reboot less 
4. Move your /usr/lib/mysql directory somewhere else and run emerge --config 
on your mysql-8.0 package.
5. Import your backed up databases and follow the mysql link above.

If you do not have db dumps, then it may be easier to install an earlier mysql 
version, dump your databases, then upgrade mysql following the devs 

Note, the above will restore your databases, but the applications using them 
may not be compatible (yet) with mysql-8.0.  Apparently, in their wisdom MySQL 
devs have introduce an even longer list of reserved words, including every day 
terms like "system", which are included in PHP SQL calls by various code bases 
up and the down the country.

So you start the database, address issues like user passwd using SHA2 instead 
of the old insecure MySQL native passwd salting and then you discover your 
website will not load at all.

At that point, you can:

· pester the application devs to rewrite their code to make its SQL calls 
compatible with mysql 8.0, or you can;
· start fishing through the code to find and enclose in `backticks` any 
reserved terms, or you can; 
· downgrade mysql for now and get on with your life.

It would be good if the ebuild posted a warning requiring the user to 
acknowledge requisite steps *prior* to upgrading mysql.  I expect it'll be a 
while before things smooth out with this issue.



File name MIME type
signature.asc application/pgp-signature