Why does Apparmor fail after I install MySQL on 18.04.1 LTS?












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.










share|improve this question
























  • Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !!
    – abu-ahmed al-khatiri
    Dec 13 '18 at 4:54






  • 2




    Possible duplicate of How to fix AppArmor `could not open` error when installing php+mysql?
    – George Udosen
    Dec 13 '18 at 8:57










  • 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 '18 at 13:46












  • # aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
    – Waylon
    Dec 13 '18 at 13:55


















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.










share|improve this question
























  • Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !!
    – abu-ahmed al-khatiri
    Dec 13 '18 at 4:54






  • 2




    Possible duplicate of How to fix AppArmor `could not open` error when installing php+mysql?
    – George Udosen
    Dec 13 '18 at 8:57










  • 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 '18 at 13:46












  • # aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
    – Waylon
    Dec 13 '18 at 13:55
















1












1








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.










share|improve this question















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.







server 18.04 mysql lts apparmor






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 13 '18 at 19:02

























asked Dec 13 '18 at 3:48









Waylon

64




64












  • Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !!
    – abu-ahmed al-khatiri
    Dec 13 '18 at 4:54






  • 2




    Possible duplicate of How to fix AppArmor `could not open` error when installing php+mysql?
    – George Udosen
    Dec 13 '18 at 8:57










  • 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 '18 at 13:46












  • # aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
    – Waylon
    Dec 13 '18 at 13:55




















  • Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !!
    – abu-ahmed al-khatiri
    Dec 13 '18 at 4:54






  • 2




    Possible duplicate of How to fix AppArmor `could not open` error when installing php+mysql?
    – George Udosen
    Dec 13 '18 at 8:57










  • 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 '18 at 13:46












  • # aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
    – Waylon
    Dec 13 '18 at 13:55


















Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !!
– abu-ahmed al-khatiri
Dec 13 '18 at 4:54




Welcome to Ask Ubuntu! Please edit your question with including the output of sudo systemctl status mysql !!
– abu-ahmed al-khatiri
Dec 13 '18 at 4:54




2




2




Possible duplicate of How to fix AppArmor `could not open` error when installing php+mysql?
– George Udosen
Dec 13 '18 at 8:57




Possible duplicate of How to fix AppArmor `could not open` error when installing php+mysql?
– George Udosen
Dec 13 '18 at 8:57












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 '18 at 13:46






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 '18 at 13:46














# aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
– Waylon
Dec 13 '18 at 13:55






# aa-complain /etc/apparmor.d ERROR: Include file /etc/apparmor.d/abstractions/mysql not found
– Waylon
Dec 13 '18 at 13:55

















active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100517%2fwhy-does-apparmor-fail-after-i-install-mysql-on-18-04-1-lts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1100517%2fwhy-does-apparmor-fail-after-i-install-mysql-on-18-04-1-lts%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Quarter-circle Tiles

build a pushdown automaton that recognizes the reverse language of a given pushdown automaton?

Mont Emei