DIAGNOSE:
service mysql start
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
- systemd has all sort of craziness going on so stop that
service mysql stop
- look at what apparmor is up to
tail -F /var/log/syslog | grep -i apparmor
- then start again
service mysql start
output is:
- mysql cannot read /etc/mysql
Aug 7 18:22:17 c505 kernel: [ 1485.490459] audit: type=1400 audit(1470619337.926:98): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" name="/etc/mysql/my.cnf.migrated" pid=11219 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=109 ouid=0
SYMPTOM
mysql fails to start
IMPACT
no sql for you
DIAGNOSE:
service mysql start
Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
- systemd has all sort of craziness going on so stop that
service mysql stop
- look at what apparmor is up to
tail -F /var/log/syslog | grep -i apparmor
- then start again
service mysql start
output is: 7.926:98) : apparmor="DENIED" operation="open" profile= "/usr/sbin/ mysqld" name="/ etc/mysql/ my.cnf. migrated" pid=11219 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=109 ouid=0
- mysql cannot read /etc/mysql
Aug 7 18:22:17 c505 kernel: [ 1485.490459] audit: type=1400 audit(147061933
GET_AROUND: d/usr.sbin. mysqld
sudo nano /etc/apparmor.
line 25 after:
# Allow config access
/etc/mysql/** r,
-add line:
/etc/mysql/* r,
systemctl restart apparmor.service
service mysql stop
service mysql start
- problem is gone
ProblemType: Bug 0ubuntu0. 16.04.2 ature: Ubuntu 4.4.0-31.50-generic 4.4.13 log.daemon. log:
DistroRelease: Ubuntu 16.04
Package: mysql-server-5.7 5.7.13-
ProcVersionSign
Uname: Linux 4.4.0-31-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
Date: Sun Aug 7 18:31:32 2016
Logs.var.
MySQLConf. etc.mysql. conf.d. mysql.cnf: [mysql] etc.mysql. conf.d. mysqld_ safe_syslog. cnf: etc.mysql. conf.d. mysqldump. cnf: etc.mysql. mysql.conf. d.mysqld_ safe_syslog. cnf: isting: ['debian-5.0.flag', 'ib_buffer_pool', 'test', 'ib_logfile1', 'xpc21.err', 'auto.cnf', 'mysql_ upgrade_ info', 'bugzilla', 'zabbix', 'debian-5.5.flag', 'debian-5.1.flag', 'redmine_default', 'roundcube', 'ib_logfile0', 'ibtmp1', 'sys', 'mysql', 'ibdata1', 'bugs', 'debian-5.7.flag', 'owncloud', 'performance_ schema' ] en_US.UTF- 8 conffile. .etc.apparmor. d.usr.sbin. mysqld: [modified] .etc.apparmor. d.usr.sbin. mysqld: 2016-08- 07T18:24: 24.264357
MySQLConf.
[mysqld_safe]
syslog
MySQLConf.
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
MySQLConf.
[mysqld_safe]
syslog
MySQLVarLibDirL
ProcEnviron:
SHELL=/bin/bash
TERM=xterm
PATH=(custom, user)
LANG=en_US.UTF-8
LANGUAGE=
SourcePackage: mysql-5.7
UpgradeStatus: Upgraded to xenial on 2016-06-13 (56 days ago)
modified.
mtime.conffile.