From: Frédéric Descamps Date: February 6 2012 10:02pm Subject: Re: mysql won't start with service, but starts with mysqld_safe List-Archive: http://lists.mysql.com/mysql/226741 Message-Id: <1328565752.7071.1.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-EmEu8sLAdeZrO0jQwYYV" --=-EmEu8sLAdeZrO0jQwYYV Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Larry, You are welcome. If you want to create the selinux policy from your audit.log, you can check the instruction from this post: http://www.lefred.be/?q=3Dnode/129 Cheers, On Mon, 2012-02-06 at 14:54 -0700, Larry Martell wrote: > 2012/2/6 Fr=C3=A9d=C3=A9ric Descamps : > > Hi, > > > > check your audit.log if you have selinux enabled >=20 > 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: >=20 > 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 } fo= r > 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=3D1709= 317 > 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=3D1709= 317 > 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=3D1709= 317 > 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=3D1709= 317 > 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=3D1709= 317 > 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=3D1709= 317 > scontext=3Dunconfined_u:system_r:mysqld_safe_t:s0 > tcontext=3Dunconfined_u:object_r:usr_t:s0 tclass=3Dfile >=20 > 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. >=20 > Thanks again! > -larry >=20 > > > > > > > > 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 servic= e I get: > >> > >> #service mysqld start > >> MySQL Daemon failed to start. > >> Starting mysqld: [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/ >=20 --=20 Fr=C3=A9d=C3=A9ric Descamps, Consultant, Percona Inc. Mob: +32 495698668 (CET)=20 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/ --=-EmEu8sLAdeZrO0jQwYYV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAABAgAGBQJPME34AAoJEASSqLQ+QBSHXhEH/iFF1deLgH8JF39pLUH9iqB2 Kvjr7HcRpkd4vMjS3tjl5Jffu90VHS7wlgyjyPkqRkWGdR3XfdIFUU1Yan9Q2081 Sc7qqx+zfA4XtmNaJ1lsuub1jFibtxwS6ifPkLyu6EfgSBCStVUVrGtmAcec2/A1 wBhEsyS1YbcvM14XS4NuMwJH4prYiNGqYG7a/M91CddyJBN6KgPHz8GjlNkq0Y9I PVJrchWJpGt/wSTWKVDPAFX8nT2uXA7mwihTkkXJAJItIQzzBZMfwLiw3RebRiQu QStL+HOozoAEWFiTypInp5XJssGoUP0tPDYb/VDb3uEgt5hODA8WBDdcZlEKiPE= =ItrH -----END PGP SIGNATURE----- --=-EmEu8sLAdeZrO0jQwYYV--