From owner-freebsd-questions@freebsd.org Mon May 18 03:57:07 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D967F2FD94F for ; Mon, 18 May 2020 03:57:07 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from nightmare.dreamchaser.org (ns.dreamchaser.org [66.109.141.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "dreamchaser.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49QQFG4BqCz4877 for ; Mon, 18 May 2020 03:57:06 +0000 (UTC) (envelope-from freebsd@dreamchaser.org) Received: from breakaway.dreamchaser.org (breakaway [192.168.151.122]) by nightmare.dreamchaser.org (8.15.2/8.15.2) with ESMTP id 04I3uvvZ055597 for ; Sun, 17 May 2020 21:56:57 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: mysql 5.6 => 5.7 upgrade confusion Message-ID: Date: Sun, 17 May 2020 21:55:01 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (nightmare.dreamchaser.org [192.168.151.101]); Sun, 17 May 2020 21:56:57 -0600 (MDT) X-Rspamd-Queue-Id: 49QQFG4BqCz4877 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of freebsd@dreamchaser.org designates 66.109.141.57 as permitted sender) smtp.mailfrom=freebsd@dreamchaser.org X-Spamd-Result: default: False [-0.31 / 15.00]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_ADDR_EQ_FROM(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; RCPT_COUNT_ONE(0.00)[1]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-0.01)[-0.014]; DMARC_NA(0.00)[dreamchaser.org]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:21947, ipnet:66.109.128.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 May 2020 03:57:07 -0000 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