0

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

user27
  • 103
  • 2

1 Answers1

0

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.

risyasin
  • 1,564
  • 9
  • 16