How to Start, Stop and Restart MySQL by using the SSH Command?



Suppose there is any problem or your MySQL has stopped working and you need to restart the MySQL by using the SSH Command for this it you need to connect your server by using the SSH Credentials, Here I assume that you have the full/root access with the sudoer permission of your server. In this post I am going to describe how we can Start, Stop and Restart the MySQL, it is easy and you can do it just by using the command below:

1. Start, Stop and Restart MySQL by using the SSH Command on Debian/Ubuntu:

a. Starting the MySQL
start mysql
b. Stopping the MySQL
stop mysql
c. Restarting the MySQL
restart mysql

Or

a. Starting the MySQL
/etc/init.d/mysql start
b. Stopping the MySQL
/etc/init.d/mysql stop
c. Restarting the MySQL
/etc/init.d/mysql restart

2. Start, Stop and Restart MySQL by using the SSH Command on CentOS/Fedora Linux version 4.x/5.x/6.x or older:

a. Starting the MySQL
service mysqld start
b. Stopping the MySQL
service mysqld stop
c. Restarting the MySQL
service mysqld restart

Or

a. Starting the MySQL
/etc/init.d/mysqld start
b. Stopping the MySQL
/etc/init.d/mysqld stop
c. Restarting the MySQL
/etc/init.d/mysqld restart

Hope it helps and you enjoyed reading, if you need the professional Magento Development we can help you, just Click on the Link and send me your requirements.

Please Like the Post on Facebook or Google+.