Scripts fixed and executed at boot, but mysqld dies immediatly
Finally my scripts (at init.d / rc.d) are running, I had to create them in a special format and enable them with chkconfig as specified on a small example that I found, but now I have another problem...
My script for samba works fine and starts the service, but my script for mysql starts the daemon mysqld (nohup mysqld_safe --user=mysel &) and it dies immediatly saying (the logs) that you need to start the service in a special way as root, but I specify it should be executed as the user mysql. Note that if I execute the command as root in a console it starts fine, but if I start it on rc.local or a startup script in rc.d/rc#.d it fails.
I think it is related to selinux since there are alerts when I log in saying that mysqld tried to read or read.write access /usr/lib/exec/mysqld or /var/lib/mysql/mysql/plugin.MYI or /var/lib/mysql/ibdata1 or /var/lib/mysql/ib_logfile1 or /var/lib/mysql/... that if I want to fix it I should
/sbin/restorecon -v THE_SPECIFIED_FILE_NAME
I execute the commands as specified and as root, but when I reboot to test the mysqld daemon still dies immediatly after run and selinux throws again the same errors, notice that these errors arise randomly, not always the same errors, even if I fix the problem once and again and again...
What can I do? I all the instructions that the selinux alert system says, but it does not appear to fix the problem :-/
Last edited by kanito73; 07-24-2013 at 09:30 AM.