Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Mar 2021 14:52:12 -0600
From:      Gary Aitken <>
To:        FreeBSD Mailing List <>
Subject:   problems upgrading mysql 5.6 => 5.7
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
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
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:

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
-rw-------  1 me  me         5 Jan  7  2020
-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.


Want to link to this message? Use this URL: <>