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
1 Colleen posted a message a couple of weeks ago about mysql hanging at boot. I
2 came across the same problem on an old PC a few days ago.
3
4 Symptom:
5 =======
6 Boot hangs as mysql service is started.
7
8 Cause:
9 =====
10 MySQL upgrade from an old 5.7 version to 8.0 has a lot of material changes,
11 which require a careful migration plan and pre-emptive steps:
12
13 https://dev.mysql.com/doc/refman/8.0/en/upgrading-from-previous-series.html
14
15 Workaround:
16 ==========
17
18 If you have not made a migration plan or taken the steps advised by MySQL
19 devs, then rebooted a headless server following your thoughtless mysql
20 installation upgrade and started scratching your head wondering why your
21 remote system has not come up, I can advise as follows.
22
23 1. Go make, then enjoy a leisurely cuppa.
24 2. About 15 minutes later try to login again. The mysql attempt to restart
25 the service should have timed out and the boot process will eventually
26 continue and complete.
27 3. Remove mysql from the default run service to make the next reboot less
28 stressful.
29 4. Move your /usr/lib/mysql directory somewhere else and run emerge --config
30 on your mysql-8.0 package.
31 5. Import your backed up databases and follow the mysql link above.
32
33 If you do not have db dumps, then it may be easier to install an earlier mysql
34 version, dump your databases, then upgrade mysql following the devs
35 instructions.
36
37 Note, the above will restore your databases, but the applications using them
38 may not be compatible (yet) with mysql-8.0. Apparently, in their wisdom MySQL
39 devs have introduce an even longer list of reserved words, including every day
40 terms like "system", which are included in PHP SQL calls by various code bases
41 up and the down the country.
42
43 https://dev.mysql.com/doc/refman/8.0/en/keywords.html
44
45 So you start the database, address issues like user passwd using SHA2 instead
46 of the old insecure MySQL native passwd salting and then you discover your
47 website will not load at all.
48
49 At that point, you can:
50
51 · pester the application devs to rewrite their code to make its SQL calls
52 compatible with mysql 8.0, or you can;
53 · start fishing through the code to find and enclose in `backticks` any
54 reserved terms, or you can;
55 · downgrade mysql for now and get on with your life.
56
57 It would be good if the ebuild posted a warning requiring the user to
58 acknowledge requisite steps *prior* to upgrading mysql. I expect it'll be a
59 while before things smooth out with this issue.
60
61 HTH.

Attachments

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