When we run a command as "service mysql start" [OR] "/etc/init.d/mysql start", The mysql daemon it starts. Who is providing the job mysql to start to those commands? What is the startup script file informing to the service command to start mysql service? Can any one tell the location of the file where 'service' command is getting the job mysql to start or stop or restart? Thanks inadvance


Mysql can be controlled by an init script (which you gave already /etc/init.d/mysql) But Ubuntu uses upstart has replaced old sysvinit style service control. and init script starts mysqld_safe (which runs mysqld as daemon mode) i know it's too complicated.

Upstart is controlling the services (you are looking for this), here is the documentation. http://upstart.ubuntu.com/ Also a side note some of the services uses a default file which is located in /etc/default these files are just configurations. Upstart scripts live in /etc/init/

Btw. Upstart will be replaced by systemd soon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.