sudo service mysql start ubuntu code example Example 1: mysql stop ubuntu service mysqld stop Example 2: restart sql server ubuntu service mysql restart