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
On Ubuntu Server, run the below command.
# /etc/init.d/mysql status
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.
If MySQL server is not running then it will through the error like below:
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.