Saturday, April 27, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 31460  / 1 Year ago, thu, january 5, 2023, 6:06:08

Today I updated the system, and I cant start the mysql server:



I'm getting the following error:



Aug 14 14:32:09 VULTURUS kernel: [ 1996.413190] init: mysql main process (14122) terminated with status 1
Aug 14 14:32:09 VULTURUS kernel: [ 1996.413262] init: mysql main process ended, respawning
Aug 14 14:32:10 VULTURUS kernel: [ 1997.373479] init: mysql post-start process (14123) terminated with status 1
Aug 14 14:32:10 VULTURUS kernel: [ 1997.391012] type=1400 audit(1344947530.964:242): apparmor="STATUS" operation="profile_replace" name="/usr/sbin/mysqld" pid=14156 comm="apparmor_parser"
Aug 14 14:32:11 VULTURUS kernel: [ 1997.453824] type=1400 audit(1344947531.028:243): apparmor="DENIED" operation="open" parent=1 profile="/usr/sbin/mysqld" name="/media/WESYS_DATA/MySql_LX/" pid=14160 comm="mysqld" requested_mask="r" denied_mask="r" fsuid=115 ouid=0
Aug 14 14:32:11 VULTURUS kernel: [ 1997.456707] init: mysql main process (14160) terminated with status 1
Aug 14 14:32:11 VULTURUS kernel: [ 1997.456775] init: mysql respawning too fast, stopped


But I already added the exception in the /etc/apparmor.d/usr.sbin.mysqld



# vim:syntax=apparmor
# Last Modified: Tue Jun 19 17:37:30 2007
#include <tunables/global>

/usr/sbin/mysqld {
#include <abstractions/base>
#include <abstractions/nameservice>
#include <abstractions/user-tmp>
#include <abstractions/mysql>
#include <abstractions/winbind>

capability dac_override,
capability sys_resource,
capability setgid,
capability setuid,

network tcp,

/etc/hosts.allow r,
/etc/hosts.deny r,

/etc/mysql/*.pem r,
/etc/mysql/conf.d/ r,
/etc/mysql/conf.d/* r,
/etc/mysql/*.cnf r,
/usr/lib/mysql/plugin/ r,
/usr/lib/mysql/plugin/*.so* mr,
/usr/sbin/mysqld mr,
/usr/share/mysql/** r,
/var/log/mysql.log rw,
/var/log/mysql.err rw,
/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/var/log/mysql/ r,
/var/log/mysql/* rw,
/var/run/mysqld/mysqld.pid w,
/var/run/mysqld/mysqld.sock w,
/run/mysqld/mysqld.pid w,
/run/mysqld/mysqld.sock w,

/sys/devices/system/cpu/ r,

/media/WESYS_DATA/MySql_LX/** rwk,
/media/WESYS_DATA/MySql_LX/** rwk,

# Site-specific additions and overrides. See local/README for details.
#include <local/usr.sbin.mysqld>
}

More From » mysql

 Answers
7

The following two lines in the /etc/apparmor.d/usr.sbin.mysqld overlap.



/media/WESYS_DATA/MySql_LX/** rwk,
/media/WESYS_DATA/MySql_LX/** rwk,


When you replace these lines to the below lines, your problem may be solved.



/media/WESYS_DATA/MySql_LX/ r,
/media/WESYS_DATA/MySql_LX/** rwk,

[#36172] Friday, January 6, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
theurn

Total Points: 30
Total Questions: 110
Total Answers: 111

Location: Bahrain
Member since Fri, Sep 16, 2022
2 Years ago
theurn questions
Tue, Apr 5, 22, 14:18, 2 Years ago
Mon, Feb 14, 22, 16:29, 2 Years ago
Sat, Apr 8, 23, 05:26, 1 Year ago
Tue, Jan 10, 23, 23:59, 1 Year ago
Fri, Apr 8, 22, 01:36, 2 Years ago
;