• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to check if 'mysqld' is running?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to check if 'mysqld' is running?


  • Subject: Re: How to check if 'mysqld' is running?
  • From: Matthew White <email@hidden>
  • Date: Fri, 07 Dec 2001 15:29:31 +0000

Hi,

Another way would be to use the c mysql api available from their site.

Lets you do lots of admin things as well as standard sql queries etc from
within cocoa.

I had good experiences with it.

Cheers,

Matt

> Hello,
>
> I'm currently write a tiny app to check, if mysql is running on my machine.
> Later it should be able to start and the mysql server from a pref pane.
> (To whom it may concern: since version 3.23.45 it's possible to stop mysql,
> prior versions did have a bug under Darwin preventing mysql from shutdown).
> Well, what I did so far is changing the shell wrapper from
> http://www.cocoadevcentral.com a little (Thx, Mr. Monitzer).
> My app is starting a simple 'ps -ax | grep mysqld' and if it's find some
> 'mysql' stuff inside the output of 'ps' it's trying to determine, what
> version of 'mysqld' is running. So far, so good. Showing information about
> 'mysqld' works as well as stopping the daemon by 'mysqld shutdown'.
> Starting seems to be quiete tricky since I don't know that much about
> authorization stuff...
> What I wanted to know: Is there an easier way to check a running daemon
> (e.g. httpd, sendmail, mysqld..)?
> Related to this question . What is a sock file? What is a pid file? Is there
> a difference between pid and sock files?
> If 'mysqld' is up and running on my machine, there's always a
> '/tmp/mysql.sock' file. However, if I try to check the file by
>
> id mysqlflag=[NSFileHandle fileHandleForReadingAtPath:@"/tmp/mysql.sock"];
> NSLog (@"DEBUGGER (xxx): --> %@", mysqlflag);
>
> it sucks. /tmp/mysql.sock does not seems to be a regular file...
>
> Can someone help me a little? Does someone know a similar project with
> source code available?
>
> TIA,
> Martin
>
> P.S. Sorry for my bad english. Sorry for being stupid in *NIX things.
> _______________________________________________
> cocoa-dev mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev


  • Follow-Ups:
    • Re: How to check if 'mysqld' is running?
      • From: Charles Bennett <email@hidden>
References: 
 >How to check if 'mysqld' is running? (From: Martin Kautz <email@hidden>)

  • Prev by Date: Re: Cocoa Documentation Updated for December Tools Release
  • Next by Date: How to handle non-character keyboard events?
  • Previous by thread: How to check if 'mysqld' is running?
  • Next by thread: Re: How to check if 'mysqld' is running?
  • Index(es):
    • Date
    • Thread