As you probably already know, MySQL is a database you can use on both Windows and Linux. In this article, we show you how to restart it to keep it running smoothly 😉
How to restart MySQL on Linux
Each Linux distribution has a script to stop, start, or restart the MySQL service, so the process may vary depending on the Linux distribution you use. Below, we explain how to do this on the most common distributions, which are the ones we offer on Clouding.io servers running Linux.
To do this, connect to the server via SSH as root.
Note
You can find more information about accessing your server via SSH in this article:
-
If you are using a Debian / Ubuntu-based distribution:
- To start the service –> /etc/init.d/mysql start
- To stop the service –>/etc/init.d/mysql stop
- To restart the service–> /etc/init.d/mysql restart
-
If you have a RedHat-based distribution (Fedora Core/Cent OS):
- To start the service –>/etc/init.d/mysqld start
- To stop the service –>/etc/init.d/mysqld stop
- To restart the service–>/etc/init.d/mysqld restart
- RedHat-based distributions also allow you to run the service command, which you can use to start, stop, and restart the service:
- service mysql start
- service mysql stop
- service mysql restart
How to restart MySQL on Windows
If you have a server running Windows and want to restart the MySQL service, simply open the operating system's Servicios section and restart it.
To do this, connect via Remote Desktop.
 Note
You can find more information about accessing your server via Remote Desktop in this article:
Once you are connected to the server, go to Inicio ( Start ) and select Ejecutar ( Run ). Type services.msc in the box, and the Windows Servicios window will open
Find the MySQL service and right-click it. Then select the action you want to perform: stop, start, or restart the service.