How do you stop MySQL in Linux?

To more thoroughly stop the MySQL database service on a Linux system, you can follow these steps:

  1. Utilize the systemctl command:
  2. You can manage system services using the systemctl command on most common Linux distributions. To stop the MySQL service, execute the following command:
  3. Please stop the mysql service using systemctl.
  4. If your system uses a different MySQL service name (e.g. mysqld), please replace the mysql part accordingly.
  5. Utilize the service command:
  6. In some older versions of Linux systems, you may need to use the service command to manage services. The command to stop the MySQL service is as follows:
  7. Please stop the mysql service.
  8. Confirm that MySQL has stopped.
  9. You can use the following command to verify if the MySQL service has been stopped:
  10. Show the status of MySQL using the systemctl command.
  11. If the MySQL service has been successfully stopped, you will see a status similar to “inactive (dead)”.

By following these steps, you can more effectively halt the MySQL database service from running in a Linux system.

Leave a Reply 0

Your email address will not be published. Required fields are marked *


广告
Closing in 10 seconds
bannerAds