Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Mar 2016 22:13:45 +0200
From:      Beeblebrox <zaphod@berentweb.com>
To:        freebsd-ports@freebsd.org
Subject:   databases/mariadb100-server fails to start inside jail
Message-ID:  <20160325221346.168804f0@rsbsd.rsb>

next in thread | raw e-mail | index | archive | help
Hi. I run mariadb100-server-10.0.23 in a jail on 11-current. Some strange e=
rrors with error-check prompted me to backup the DB and create a fresh new =
instance to which I plan to restore the data later. Now MDB fails to start =
in the jail, but does start on native. I've narrowed the problem thus:

* Start the SQL jail & #jexec sql-jail csh

root@sql-jail# mysqld_safe --nowatch --skip-grant-tables
MDB does not start, sql-jail/var/log/mysql-safe.log shows:

- mysqld_safe Starting mysqld daemon with databases from /var/db/mysql
- [Note] Initializing built-in plugins
- [ERROR] mysqld: Can't create/write to file '/var/db/mysql/aria_log_contro=
l' (Errcode: 13 "Permission denied")
- [ERROR] mysqld: Got error 'Can't create file' when trying to use aria con=
trol file '/var/db/mysql/aria_log_control'
....
- [ERROR] Aria engine is not enabled or did not start. The Aria engine must=
 be enabled to continue as mysqld was configured with --with-aria-tmp-tables
- [ERROR] Aborting
----------------------
The error message makes no sense because:
root@sql-jail# su -m mysql (or "sudo -u mysql sh")
$ id --> uid=3D88(mysql) gid=3D88(mysql) groups=3D88(mysql)
/var/db/mysql$ touch aria.log --> -rw-r--r--  1 mysql  mysql aria.log

sql-jail/etc/passwd mysql entry:
mysql:*:88:88:MySQL Daemon:/var/db/mysql:/usr/sbin/nologin

sql-jail/var/log/messages has this:
su: _secure_path: cannot stat /var/db/mysql/.login_conf: Permission denied

I have 5 more jails with different services but none of them have any such =
problem, so I'm convinced it's a MariaDB issue. It's also worth noting that=
 MDB had several difficulties creating the initial control tables in the ja=
il, so I had to actually complete that stage on native, then copy the mysql=
 folder to the jail's path.

Everything is on ZFS, I even tried a modified mount point for mysql with no=
 effect as "aclinherit =3D passthrough"

Regards.

--=20
FreeBSD_amd64_11-Current_RadeonKMS
Please CC my email when responding, mail from list is not delivered.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160325221346.168804f0>