Check out example codes for "start stop mysql linux". It will help you in understanding the concepts better.

Code Example 1

service mysql start
service mysql stop
service mysql restart

Learn ReactJs, React Native from akashmittal.com