From owner-freebsd-questions@freebsd.org Sun Mar 21 20:52:21 2021 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 B3D365ABE4E for ; Sun, 21 Mar 2021 20:52:21 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4F3VF06L5Zz3w86 for ; Sun, 21 Mar 2021 20:52:20 +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 12LKqCTm050335 for ; Sun, 21 Mar 2021 14:52:13 -0600 (MDT) (envelope-from freebsd@dreamchaser.org) To: FreeBSD Mailing List Reply-To: freebsd@dreamchaser.org From: Gary Aitken Subject: problems upgrading mysql 5.6 => 5.7 Message-ID: <48b6f3cd-d884-f414-d720-a94e8b27f3b1@dreamchaser.org> Date: Sun, 21 Mar 2021 14:52:12 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1 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, 21 Mar 2021 14:52:13 -0600 (MDT) X-Rspamd-Queue-Id: 4F3VF06L5Zz3w86 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 [-3.30 / 15.00]; HAS_REPLYTO(0.00)[freebsd@dreamchaser.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[66.109.141.57:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; REPLYTO_ADDR_EQ_FROM(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[66.109.141.57:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_NA(0.00)[dreamchaser.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; 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]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2021 20:52:21 -0000 I'm revisiting a problem I never solved a year ago... 11.4 RELEASE mysql 5.6 was upgraded to 5.7 as a result of a libreoffice install. I've never been able to use it (mysql) since due to problems upgrading the dbs. mysqld was always started from a user account (I think...) The dbs are (I think) in their state prior to the mysql upgrade. I'm trying to follow the upgrade instructions at https://dev.mysql.com/doc/refman/5.7/en/upgrade-binary-package.html When attempting to upgrade in place, the first step is to start the server, but when doing so I get an access error: $ mysqld [Note] mysqld (mysqld 5.7.32-log) starting as process 11334 ... [Warning] One can only use the --user switch if running as root ... [Note] InnoDB: Completed initialization of buffer pool [ERROR] InnoDB: The innodb_system data file 'ibdata1' must be writable ... [ERROR] Aborting $ cat ~/.my.cnf: [mysqld] datadir=/hd2/home/me/mysql_data tmpdir=/hd2/home/me/tmp innodb_strict_mode=on The data directory is writable by the user starting mysqld, as are all of the files in it: $ ls -l -rw------- 1 me me 56 Oct 15 2016 auto.cnf -rw-r----- 1 me me 10040 Mar 21 12:47 breakaway.dreamchaser.org.err -rw------- 1 me me 5 Jan 7 2020 breakaway.pid -rw------- 1 me me 50331648 Feb 6 2020 ib_logfile0 -rw------- 1 me me 50331648 Oct 15 2016 ib_logfile1 -rw------- 1 me me 27262976 Feb 6 2020 ibdata1 drwx------ 2 me me 2560 Oct 15 2016 mysql -rw------- 1 me me 0 Feb 8 2020 mysql-bin.index -rw------- 1 me me 6 Oct 15 2016 mysql_upgrade_info drwx------ 2 me me 2560 Oct 15 2016 performance_schema The system directory /var/db/mysqld exists and is owned/writeable by the mysql user, as are all of the files in it. mysqld is not writing the .err file in the user mysql_data directory. However, if I use mysqld_safe it fails with the same error, but writes everything to the .err file. It appears to be reading ~/.my.cnf properly; if I remove the tmpdir line it complains about not being able to write the temp file: mysqld: Can't create/write to file '/var/db/mysql_tmpdir/ibCm5Ujq' (Errcode: 13 - Permission denied) Any ideas what's going on? Everything I've searched for implies the permissions aren't set properly, but I don't see that. Gary