Problems with SELinux and mySQL on CentOS?

OS: CentOS 4.2
mySQL 4.0

mySQL was running on a new server under medium load (forum) the whole day without a problem but in the evening mySQL stopped and I wasn't able to restart the mySQL daemon (error "giving up"). After a few tries I killed the mySQL processes.

In /var/log/messages I found many messages like
Jan 23 15:41:08 oliver kernel: audit(1138048868.280:326): avc: denied { append } for pid=32351 comm="mysqld" name="oliver.srvtm.net.err" dev=sdb1 ino=703164 scontext=user_uProblems with SELinux and mySQL on CentOS?ystem_r:mysqld_t tcontext=user_u: object_r:var_lib_t tclass=file
Jan 23 15:41:08 oliver kernel: audit(1138048868.281:327): avc: denied { getattr } for pid=32351 comm="mysqld" name=".my.cnf" dev=sda2 ino=194999 scontext=user_uProblems with SELinux and mySQL on CentOS?ystem_r:mysqld_t tcontext=user_u: object_r:user_home_dir_t tclass=file
Jan 23 15:41:08 oliver kernel: audit(1138048868.281:328): avc: denied { read } for pid=32351 comm="mysqld" name=".my.cnf" dev=sda2 ino=194999 scontext=user_uProblems with SELinux and mySQL on CentOS?ystem_r:mysqld_t tcontext=user_u: object_r:user_home_dir_t tclass=file
Jan 23 15:41:08 oliver kernel: audit(1138048868.282:329): avc: denied { write } for pid=32351 comm="mysqld" name="mysql" dev=sdb1 ino=703181 scontext=user_uProblems with SELinux and mySQL on CentOS?ystem_r:mysqld_t tcontext=root: object_r:var_lib_t tclass=dir


so for me it looks like a problem between SELinux and mySQL.

/etc/selinux/config is set to:
SELINUX=permissive
SELINUXTYPE=targeted

I now changed etc/selinux/booleans
from mysqld_disable_trans=0 to 1.

Can anybody confirm there is a problem between SELinux and mySQL and that I did the right thing in disabling it for mySQL? Or is this a know bug? Any way to fix it?

Thanks a lot, SELinux is pretty new to me Problems with SELinux and mySQL on CentOS?

 

 

 

 

Top