Find out If MySQL Is Running On Linux Or Not

# mysqladmin -u root -p status  

Output (if yes):

"Enter password: Uptime: 4 Threads: 1 Questions: 62 Slow queries: 0 Opens: 51 Flush tables: 1 Open tables: 45 Queries per second avg: 15.500"

Output (Else)

"mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)' Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists! "
Under Debian Linux you can type following command to find out if MySQL server is running or not 

# /etc/init.d/mysql status

If you are using RedHat of Fedora then you can use following script”

# service mysqld status
OR
# /etc/init.d/mysqld status

Reference :
Cyberciti


Leave a Reply

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