mysql5: is it running and how can I tell?

paul beard paulbeard at gmail.com
Tue Jul 10 15:40:57 PDT 2007


On 7/10/07, Ryan Schmidt <ryandesign at macports.org> wrote:
>
>
> On Jul 10, 2007, at 11:29, markd at macports.org wrote:
>
> > On Monday, July 9, 2007 at 11:03 PM paul beard wrote:
> >
> >> My guess is that it isn't. And I don't know why. Using ps gives me
> >> this.
> >>
> >> root        47   0.0  0.1    27884    816  ??  Ss   10:46PM   0:00.04
> >> /opt/local/bin/daemondo --label=mysql5 --start-cmd
> >> /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper
> >> start ;
> >> --stop-cmd
> >> /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper
> >> stop ;
> >> --restart-cmd
> >> /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper
> >> restart ;
> >> --pid=/opt/local/var/mysql.pid
> >>
> >>
> >> running the script by hand gives me this.
> >>
> >>
> >> /opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper start
> >> Starting MySQL/opt/local/share/mysql5/mysql/mysql.server: line
> >> 159: kill:
> >> (580) - No such process
> >>
> >>
> >> the offending line 159?
> >>
> >>
> >>    152 wait_for_pid () {
> >>    153   i=0
> >>    154   while test $i -ne $service_startup_timeout ; do
> >>    155     sleep 1
> >>    156     case "$1" in
> >>    157       'created')
> >>    158         test -s $pid_file && i='' && break
> >>    159         kill -0 $2 || break # if the program goes away, stop
> >> waiting
> >>    160         ;;
> >>    161       'removed')
> >>
> >>
> >> and I get these messages now:
> >> Workaround Bonjour: Unknown error: 0
> >>
> >>
> >> I don't think they are anything to do with mysql, perhaps apache2
> >> since
> >> it doesn't do zeroconf stuff like the vendor-supplied httpd.
> >
> > Yeah, doesn't look like it is running because I don't see mysqld
> > running
> > in the ps output.  The Bonjour message is unrelated, though I'm not
> > sure
> > why they occur.  Is it a new install, and if so have you run
> > mysql_install_db5?  Here is how I setup mysql5.
> >
> > http://homepage.mac.com/duling/halfdozen/NeDi-Howto.html#d0e94
>
> Also, have a look at the MySQL error log. See if it says anything
> helpful.
>
>
> You're not really meant to run the wrapper script yourself. The
> correct way to stop MySQL is:
>
> sudo launchctl unload -w /Library/LaunchDaemons/
> org.macports.mysql5.plist
>
> And the correct way to start it is:
>
> sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist
>
>
>
I prefer this:
launchctl load -w
/opt/local/etc/LaunchDaemons/org.macports.mysql5/org.macports.mysql5.plist
as it keeps the plist back in the /opt tree where it belongs. It does
require editing /etc/launch.conf, but I don't see that as a big deal versus
adding symlinks all over the place.

I did get mysql running by hand after re-rerunning the install script. Still
had to change permissions on the db_dir afterwards. Still not sure if it
will startup by itself, but i'll test that next.



-- 
Paul Beard / www.paulbeard.org/
<paulbeard at gmail.com/paulbeard at mac.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-users/attachments/20070710/7a8812bd/attachment.html


More information about the macports-users mailing list