Is there a way to make CentOS send me an email anytime the server reboots or a workaround to do so? My server rebooted randomly and I had no idea about it until several hours later and the MySQL service failed to restart upon reboot due to,
Another MySQL daemon already running with the same unix socket
Which requires manual intervention to resolve and is a crucial service.
Yes, use free service like pingdom to monitor your server. You will get instant email alert when your server is unresponsive.
█ YagHost - Pure SSD Hosting | Since 2007 | Average Response Time: 15 min
█ Web Hosting | Reseller Hosting | Managed VPS Hosting
█ 99.9% Server Uptime Guarantee | 24/7 Rapid Response Tech Support | 30 Day Money Back Guarantee
█ LopHost.com - Web Hosting Tutorials
2. Create an init script that will send an email in event of startup or shutdown. Then start is and run "chkconfig <script name> on"
Anyway, what exact issue you are facing with MySQl auto start up? if its not starting up after reboot, make sure its enabled on all run levels. Else run "chkconfig mysql on" and that will turn on MySQL on network enabled run levels. If its something else, script your solution, make it executable, put the script location to /etc/rc.local which will be executed after every reboot; though applying a permanent fix is recommended.