debian 9 restart mysql code example Example 1: ubuntu restart mysql sudo service mysql restart Example 2: mysqld restart sudo /etc/init.d/mysql restart