This example shows how to start/restart the mysqld service on Amazon Linux2 Server
There are two ways to start the mysql service
sudo service start mariadb
sudo systemctl start mariadb
If you want restart the service then simple change start to restart.
sudo service restart mariadb
sudo systemctl restart mariadb