MySQL Service Stopped Running on The Server CloudLinux 7

In this article, we will check if MySQL service stopped running on the server and resolve it.

First of all, let’s check if MySQL is listening on the standard MySQL port 3306

Run following command to check that a program is listening on 3306 port

# netstat –tcp –udp –listening –program -n|grep 3306

Now, check the status of the service:

# systemctl status mysql.service

If the status of the MySQL service is stopped, try to start it using following command:

# systemctl start mysql

If MySQL is not running but lock exists, it appears that the MySQL PID file was not removed after system restart, or MySQL server was not stopped properly. Please check if PID file exists while MySQL server is not running and if yes, remove that PID file.

Also, remove the lock file using this command:

# rm /var/lock/subsys/mysql
rm: remove regular empty file `/var/lock/subsys/mysql’? y

Then try to restart MySQL again.

# systemctl restart mysql

Now, check the status of the MySQL service.

# systemctl status mysql.service

If MySQL service still now running, contact us. Our server experts will solve the issue.

[Need assistance to fix this error or install tools? We’ll help you.]

Leave a Comment

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

Open chat