Home Linux How To Check MySQL is Running or Not

How To Check MySQL is Running or Not

Q. My manager gave me new Linux Server for setup. How can I check MySQL server is running on the Linux server ??

It’s quite easy to check the status of the MySQL server status. Here I am showing you 2 methods.
1. From script
2. mysqladmin utility

1. From Script

On CentOS 7, run the following script to check the MySQL is running or not.

# systemctl status mysqld
mysql statusmysql status

On Ubuntu Server, run the below command.

# /etc/init.d/mysql status
mysql server status on ubuntumysql 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 outputmysql uptime output

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

mysql server is not runningmysql server is not running

READ : How to Take Backup and Restore the MySQL Database


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.


Please enter your comment!
Please enter your name here