I want to stop mySQL server in CentOS 7

Asked 1 years ago, Updated 1 years ago, 67 views

I am using MySQL 5.7 in CentOS 7.

I want to stop all MySQL, but when I stop and check the status, it looks like the following and I can't stop it.

#Stop MySQL
service mysqld stop

# Check status
service mysqld status
Aug 25 18:36:44 localhost.localdomain systemd[1]: Starting MySQL Server...
Aug 25 18:36:44 localhost.localdomain systemd[1]—Started MySQL Server.
Aug 25 18:42:54 localhost.localdomain systemd[1]: Stopping MySQL Server...
Aug 25 18:42:56 localhost.localdomain systemd[1]: Stopped MySQL Server.

How can I stop all of these statuses?
And what they mean is that each of the four different processes is starting up MySQL servers?

Thank you for your cooperation.

mysql centos

2022-09-30 19:55

2 Answers

status Did you read the text that was displayed as a result?

Starting MySQL server
MySQL Server Started
Stopping MySQL server
MySQL server is down

# In short, log that no errors occurred during start or end

Therefore, there is no claim here that there is a four-part process going up.It seems that it is finished correctly, that is, nothing is wrong.


2022-09-30 19:55

The service command has been executed, but CentOS 7 has been replaced by systemctl.
(The service command redirects you to the systemctl command)

You should actually do it in the following format, for example:

$sudo systemctl status mysqld.service

And when you run systemctl, you see a few lines of the most recent operation log, so if it ends with Stopped MySQL Server, the process has stopped.

Or, when you run systemctl status mysqld.service, you can see the current state by looking at the Active: line.

operating:

Active:active(running)

stopping:

Active:inactive(dead)


2022-09-30 19:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.