[debian-mysql] Bug#865534: mariadb-server-10.1: Fails in postinst on upgrade from jessie, gives incorrect resolution instructions
John Goerzen
jgoerzen at complete.org
Thu Jun 22 13:05:43 UTC 2017
Package: mariadb-server-10.1
Version: 10.1.23-9+deb9u1
Severity: important
On upgrade from Jessie, I see this:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: ^G/usr/sbin/mysqld: Can't
read dir of '/etc/mysql/mariadb.conf.d/' (Errcode: 13 "Permission
denied")
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: Fatal error in defaults
handling. Program aborted
Jun 22 08:01:53 hephaestus kernel: [36298.023045] audit: type=1400
audit(1498136513.533:65): apparmor="DENIED" operation="open"
profile="/usr/sbin/mysqld" name="/etc/mysql/mariadb.conf.d/" pid=30762
comm="mysqld
" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: Installation of system
tables failed! Examine the logs in
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: /var/lib/mysql for more
information.
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: The problem could be
conflicting information in an external
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: my.cnf files. You can
ignore these by doing:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: shell>
/usr/scripts/scripts/mysql_install_db --defaults-file=~/.my.cnf
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: You can also try to start
the mysqld daemon with:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: shell>
/usr/sbin/mysqld --skip-grant --general-log &
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: and use the command line
tool /usr/bin/mysql
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: to connect to the mysql
database and look at the grant tables:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: shell> /usr/bin/mysql
-u root mysql
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: mysql> show tables;
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: Try 'mysqld --help' if
you have problems with paths. Using
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: --general-log gives you a
log in /var/lib/mysql that may be helpful.
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: The latest information
about mysql_install_db is available at
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: MariaDB is hosted on
launchpad; You can find the latest source and
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: email lists at
http://launchpad.net/maria
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: Please check all of the
above before submitting a bug report
Jun 22 08:01:53 hephaestus mysqld_safe[30734]: at
http://mariadb.org/jira
Jun 22 08:01:53 hephaestus mysqld_safe[30734]:
Jun 22 08:01:53 hephaestus mysqld_safe[30768]: ^G/usr/sbin/mysqld: Can't
read dir of '/etc/mysql/mariadb.conf.d/' (Errcode: 13 "Permission
denied")
I suspect this is AppArmor-related. However, the resolution
instructions are also wrong, referencing /usr/scripts/scripts.
-- System Information:
Debian Release: 9.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8), LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages mariadb-server-10.1 depends on:
ii adduser 3.115
ii debconf [debconf-2.0] 1.5.61
ii galera-3 25.3.19-2
ii gawk 1:4.1.4+dfsg-1
ii init-system-helpers 1.48
ii iproute2 4.9.0-1
ii libaio1 0.3.110-3
ii libc6 2.24-11+deb9u1
ii libdbi-perl 1.636-1+b1
ii libpam0g 1.1.8-3.6
ii libstdc++6 6.3.0-18
ii libsystemd0 232-25
ii lsb-base 9.20161125
ii lsof 4.89+dfsg-0.1
ii mariadb-client-10.1 10.1.23-9+deb9u1
ii mariadb-common 10.1.23-9+deb9u1
ii mariadb-server-core-10.1 10.1.23-9+deb9u1
ii passwd 1:4.4-4.1
ii perl 5.24.1-3
ii psmisc 22.21-2.1+b2
ii rsync 3.1.2-1
ii socat 1.7.3.1-2+b1
ii zlib1g 1:1.2.8.dfsg-5
Versions of packages mariadb-server-10.1 recommends:
ii libhtml-template-perl 2.95-2
Versions of packages mariadb-server-10.1 suggests:
ii bsd-mailx [mailx] 8.1.2-0.20160123cvs-4
pn mariadb-test <none>
ii netcat-openbsd 1.130-3
pn tinyca <none>
-- debconf information:
mariadb-server-10.1/postrm_remove_databases: false
mariadb-server-10.1/old_data_directory_saved:
mariadb-server-10.1/nis_warning:
More information about the pkg-mysql-maint
mailing list