How to Start, Stop, and Restart MySQL Server?

25-Mar-2023

.

Admin

How to Start, Stop, and Restart MySQL Server?

Hello Friends,

This post will give you an example of how to start stop and restart the MySQL server. We will use how to restart the remote mysql server running on Ubuntu. step by step explain how I start and stop mysql server. you'll learn how to restart mysql in ubuntu.

This tutorial will give you an example of how to start stop and restart mysql server. I’m going to show you how to restart the remote mysql server running on Ubuntu. I explained simply how do I start and stop mysql server. if you want to see an example of how to restart mysql in ubuntu then you are in the right place. Let's get started with how to start.

Using Service Command


If you are using the service distribution of MySQL, so you need to run the following service command to start, stop and restart of your MySQL server on Linux ubuntu using the command line:

To start MySQL server:

sudo service mysqld start

To stop MySQL server:

sudo service mysqld stop

To restart MySQL server:

sudo service mysqld restart

Using init/d Command

If you are using the init/d distribution of MySQL, so you need to run the following init/d command to start, stop and restart your MySQL server on Linux ubuntu using the command line:

To start MySQL server:

sudo /etc/init.d/mysqld start

To stop MySQL server:

sudo /etc/init.d/mysqld stop

To restart MySQL server:

sudo /etc/init.d/mysqld restart

Using systemctl Command

If you are using systemctl distribution of MySQL, so you need to run the following systemctl command to start, stop and restart your MySQL server on Linux ubuntu using the command line:

To start MySQL server:

sudo systemctl start mysqld

To stop MySQL server:

sudo sudo systemctl stop mysqld

To restart MySQL server:

sudo systemctl restart mysqld

I hope it can help you...

#Ubuntu