From: Larry Martell Date: February 6 2012 9:54pm Subject: Re: mysql won't start with service, but starts with mysqld_safe List-Archive: http://lists.mysql.com/mysql/226740 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 2012/2/6 Fr=C3=A9d=C3=A9ric Descamps : > Hi, > > check your audit.log if you have selinux enabled Ah, thanks for mentioning this. I didn't even think of that. Sure enough, if I disabled selinux, it worked. Now I have to figure out why it's failing under selinux. In the audit log I see these messages when I try and start it: type=3DAVC msg=3Daudit(1328563688.649:3999): avc: denied { write } for pid=3D25344 comm=3D"touch" name=3D"mysql.err" dev=3Ddm-0 ino=3D1709317 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.649:4000): avc: denied { write } for pid=3D25344 comm=3D"touch" name=3D"mysql.err" dev=3Ddm-0 ino=3D1709317 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.651:4001): avc: denied { setattr } for pid=3D25345 comm=3D"chown" name=3D"mysql.err" dev=3Ddm-0 ino=3D1709317 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.688:4002): avc: denied { append } for pid=3D25238 comm=3D"mysqld_safe" name=3D"mysql.err" dev=3Ddm-0 ino=3D170931= 7 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.688:4003): avc: denied { append } for pid=3D25238 comm=3D"mysqld_safe" name=3D"mysql.err" dev=3Ddm-0 ino=3D170931= 7 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.694:4004): avc: denied { append } for pid=3D25381 comm=3D"mysqld_safe" name=3D"mysql.err" dev=3Ddm-0 ino=3D170931= 7 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.694:4005): avc: denied { append } for pid=3D25381 comm=3D"mysqld_safe" name=3D"mysql.err" dev=3Ddm-0 ino=3D170931= 7 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.697:4006): avc: denied { append } for pid=3D25238 comm=3D"mysqld_safe" name=3D"mysql.err" dev=3Ddm-0 ino=3D170931= 7 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile type=3DAVC msg=3Daudit(1328563688.697:4007): avc: denied { append } for pid=3D25238 comm=3D"mysqld_safe" name=3D"mysql.err" dev=3Ddm-0 ino=3D170931= 7 scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile mysql.err was 660 owned by mysql.mysql and the dir it's in was 755, also owned by mysql.mysql. I tried changing the file to 666 and the dir to 777, but I got the same errors. I also tried moving the log file to /tmp, but I still got the same errors. So it's not permissions. I don't know too much about selinux - I"ll have to research that more. Thanks again! -larry > > > > On Sat, 2012-02-04 at 17:57 -0700, Larry Martell wrote: >> Just installed mysql on centos 6.2. When I try to start it with service = I get: >> >> #service mysqld start >> MySQL Daemon failed to start. >> Starting mysqld: =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 [FAILED] >> >> Nothing at all is written to the error log. >> >> But if I start it with mysqld_safe it comes up and works fine. >> >> Anyone know what could be going on here? >> >> -larry >> > > -- > Fr=C3=A9d=C3=A9ric Descamps, Consultant, Percona Inc. > Mob: +32 495698668 (CET) > Skype: lefred.descamps > Jabber: lefred.descamps@stripped > > 24/7 Emergency Line +1 888 401 3401 ext 911 > > Our Services: http://www.percona.com/services.html > Our Blog: http://www.mysqlperformanceblog.com/ > > Percona Training Workshops: http://www.percona.com/training/ > > Percona Live MySQL Conference April 10-12 Santa Clara > http://www.percona.com/live/mysql-conference-2012/