When running a web server it’s vital that you have you important that you have applications like apache and mysql start when the system does. Who knows what might trigger a reboot and even more, you don’t want to perform a quick restart and have the entire server crumble. Well fear not, it is very easy to set up your system for running applications on system startup.
The following command will work for Centos and Red Hat Linux.
chkconfig --level 234 mysqld on
Run the above command in your command line tool and mysql will be set to start when the system does. Replace mysql with another application name such as httpd to make that application start up on boot too.