
It’s quite easy to check the status of the MySQL server status. Here I am showing you 2 methods.
- From script
- mysqladmin utility
1. From Script
On CentOS 7, run the following script to check the MySQL is running or not.
# systemctl status mysqld

mysql status
On Ubuntu Server, run the below command.
# /etc/init.d/mysql status

mysql server status on ubuntu
2. Use mysqladmin utility
Another method to check, mysqladmin utility is used.
On CentOS 7,
# mysqladmin -u root -p status
On Ubuntu Server, same command will work.

mysql uptime output
If MySQL server is not running then it will through the error like below:

mysql server is not running
Conclusion
You have perfectly learned how to check MySQL is running or not on the Linux server. For any feedback write in the below comment section.