1

I have a test web server that I'm trying to add MySQL to then further mumps. After installation of MySQL AppArmor(aa) has a parser failure and has an exit-code 123. I have purged the MySQL installation multiple times with aa returning to normal and can replicate the errors consistently.

Please help me debug this as I am eager to get this up and running.

I'm installing MySQL as root using:

# apt install mysql-*

There is an error line during installation that reads: AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at Line 9: Could not open 'Abstractions/mysql'

I reboot and aa initialization fails

# service apparmor status

AppArmor parser error for /etc/apparmor.d/usr.sbin.mysqld in /etc/apparmor.d/usr.sbin.mysqld at Line 9: Could not open 'Abstractions/mysql'again/still

As for MySQL server it looks to be up and running until... well that's another question

------Edit----- # systemctl status mysql output:

 mysql.service - MySQL Community Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2018-12-13 05:59:37 MST; 30min ago
  Process: 1213 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid (code=exited, status=0/SUCCESS)
  Process: 1049 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
 Main PID: 1218 (mysqld)
    Tasks: 29 (limit: 3517)
   CGroup: /system.slice/mysql.service
           └─1218 /usr/sbin/mysqld --daemonize --pid-file=/run/mysqld/mysqld.pid

Dec 13 05:59:31 web-server systemd[1]: Starting MySQL Community Server...
Dec 13 05:59:37 web-server systemd[1]: Started MySQL Community Server.

-----------Update-------------------

I created the file /etc/apparmor.d/abstractions/mysql and included the information provided by https://askubuntu.com/a/1099187/682590:

# ------------------------------------------------------------------
#
#    Copyright (C) 2002-2006 Novell/SUSE
#    Copyright (C) 2013 Christian Boltz
#
#    This program is free software; you can redistribute it and/or
#    modify it under the terms of version 2 of the GNU General Public
#    License published by the Free Software Foundation.
#
# ------------------------------------------------------------------

   /var/lib/mysql{,d}/mysql{,d}.sock rw,
   /{var/,}run/mysql{,d}/mysql{,d}.sock rw,
   /usr/share/{mysql,mysql-community-server,mariadb}/charsets/ r,
   /usr/share/{mysql,mysql-community-server,mariadb}/charsets/*.xml r,

and so far everything is ok except that MySQL Workbench can't connect to the local database but I pretty sure that's another question. Thank you all for your help.

4
  • Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !! Dec 13, 2018 at 4:54
  • 2
  • Upon installing the aa profiles and extras there's another four parser errors AppArmor parser error for /etc/apparmor.d/sbin.syslog-ng in /etc/apparmor.d/sbin.syslog-ng at line 22: Could not open 'abstractions/mysql' X 4
    – Waylon
    Dec 13, 2018 at 13:46
  • # aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
    – Waylon
    Dec 13, 2018 at 13:55

0

You must log in to answer this question.

Browse other questions tagged .