mysql 5.6 => 5.7 upgrade confusion

Gary Aitken freebsd at dreamchaser.org
Mon May 18 03:57:07 UTC 2020


When I upgraded a system to 11.3-RELEASE some time ago, I
reinstalled all packages, which unfortunately installed mysql
5.7; I had been running 5.6.  In trying to decipher the upgrade
process, everything I see implies the server will start.

When I attempt to start the server as a non-priveledged user
(formerly possible) I get this:
$ mysqld
2020-05-18T03:17:18.343412Z 0 [Warning] Insecure configuration for --secure-file-priv: Current value does not restrict location of g
enerated files. Consider setting it to a valid, non-empty path.
2020-05-18T03:17:18.343569Z 0 [Note] mysqld (mysqld 5.7.29-log) starting as process 32850 ...
2020-05-18T03:17:18.348147Z 0 [Warning] One can only use the --user switch if running as root
...
mysqld: Can't create/write to file '/var/db/mysql_tmpdir/ibA6vgIL' (Errcode: 13 - Permission denied)
2020-05-18T03:17:18.376691Z 0 [ERROR] InnoDB: Unable to create temporary file; errno: 13

So I tried starting as root, which created a whole new/different data
and config directory (no surprise there) but failed with this:

...
mysqld: Table 'mysql.plugin' doesn't exist
2020-05-18T02:05:35.875695Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
...
2020-05-18T02:05:36.298788Z 0 [Note] Auto generated RSA key files are placed in data directory.
2020-05-18T02:05:36.298894Z 0 [Note] Server hostname (bind-address): '127.0.0.1'; port: 3306
2020-05-18T02:05:36.298919Z 0 [Note]   - '127.0.0.1' resolves to '127.0.0.1';
2020-05-18T02:05:36.298991Z 0 [Note] Server socket created on IP: '127.0.0.1'.
2020-05-18T02:05:36.300123Z 0 [Warning] Failed to open optimizer cost constant tables

2020-05-18T02:05:36.300238Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2020-05-18T02:05:36.300250Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2020-05-18T02:05:36.300321Z 0 [ERROR] Aborting

I'm confused as to how to proceed from here.  I need to run
mysql_upgrade as a normal user; but I clearly need to run it first
as root; but I can't run it if the server won't start because of
the plugin table issue reported above.

confused, as usual...
thanks for any enlightenment,

Gary


More information about the freebsd-questions mailing list