|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Unix Command to See if mysqld is running?
Is there a way using a UNIX command to tell if the mysqld daemon is running that simply returns a boolean?
I know you can use the ps command and then parse it, but I am wondering if there is a simpler way. Thanks for any help, -Marc |
|
#2
|
|||
|
|||
|
ps -ef | grep mysqld
or when do you want to test it automatically in any script: ps -ef | grep -q mysqld if [ $? -eq 0 ] then echo "MySql is not running ..." # do something else echo "MySql is already running." fi |
|
#3
|
|||
|
|||
|
Thank you
Thanks very much...
|
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Unix Command to See if mysqld is running? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|