Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old September 12th, 2003, 02:35 PM
Desto Desto is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 Desto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Showing Mysql status

Hi everyone,
Sometimes i get trouble with mysqld cause it stops. I wanted to print it in a little php script with using bash script commands. Here is the code:
**********************************************
<?
$mysqld = system("service mysqld status");
?>
***********************************************

I want to develop this script cause it print a message like this:

**********************************
mysqld (pid 2269) is running...
**********************************

It looks too basic for me. I want it to write a message like this:
Mysqld is ok
or
Mysqld is stopped

How can i make this?
Can anyone show the way please?
Have a nice day!!!




Reply With Quote
  #2  
Old September 21st, 2003, 07:28 PM
zackcoburn zackcoburn is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 184 zackcoburn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Showing Mysql status

What does "service mysqld status" display if MySQL isn't running?

Reply With Quote
  #3  
Old September 22nd, 2003, 07:19 AM
Desto Desto is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 2 Desto User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
RE: Showing Mysql status

When mysql stopped it gives the error message as
"mysqld is stopped"

Reply With Quote
  #4  
Old September 22nd, 2003, 09:48 AM
zackcoburn zackcoburn is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Posts: 184 zackcoburn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Showing Mysql status

How about:

php Code:
Original - php Code
  1.  
  2. if (strpos($mysqld,"running")===FALSE){
  3. echo "Mysqld is stopped";
  4. }else{
  5. echo "Mysqld is running";
  6. }

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Showing Mysql status


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway