I don't know if this is a CRUX problem or just me messing up my system
(probably the later :P) but here goes.
I have always started mysqld manually from a shell with mysqld_safe since i
installed CRUX without problems, but since a couple of weeks that doesn't
work any more. If i start manually/directly with /usr/sbin/mysqld i get
081124 23:03:42 [ERROR] /usr/sbin/mysqld: Can't create/write to file
'/var/run/mysqld.pid' (Errcode: 13)
081124 23:03:42 [ERROR] Can't start server: can't create PID file:
BUT, if i start with the startscript in /etc/rc.d/mysqld, it work's. I
figured out that it works because the startscript in /etc/rc.d creates the
PID file as root and then change owner to daemon for user and group before
it executes mysqld as the user daemon. This because (probably?) nobody but
root has write privileges to /var/run. But how on earth could mysqld_safe
have worked before? The only thing i've done before it stopped working, that
i can think of, is installing a couple of ports. Unfortunatly i forgot
exactly which ports i installed since i hadn't used mysql for a couple of
weeks when i discovered this problem.
Have some port changed the write privileges for group in /var/run? Should
group have write privileges to /var/run? I've seen other services PID files
in /var/run that has owner and group "daemon" so i still don't understand
why just mysqld_safe doesn't work anymore.
I know i can enable /etc/rc.d/mysqld in startup, but i just use mysql
sometimes for testing and don't want to waste resources when i don't need
it, and also this mysterious problem annoys me.
CRUX mailing list