[MacPorts] #35183: mysql51, mysql55, percona, mariadb: Simple stop/start applescript (was: mysql5-server: Simple stop/start applescript)
Craig Treleaven
ctreleaven at cogeco.ca
Sat Jul 14 06:24:50 PDT 2012
At 8:08 AM +0000 7/14/12, MacPorts wrote:
>#35183: mysql51, mysql55, percona, mariadb: Simple stop/start applescript
>----------------------------------+-----------------------------------------
> Reporter: ctreleaven@ | Owner:
>macports-tickets@
> Type: enhancement | Status:
>new
> Priority: Normal |
>Milestone:
>Component: ports | Version:
>2.1.1
> Keywords: | Port:
>mysql51, mysql55, percona, mariadb
>----------------------------------+-----------------------------------------
>Changes (by ryandesign@):
>
> * cc: quest@, jogwtr@ (added)
> * port: mysql5-server => mysql51, mysql55, percona, mariadb
>
>
>Comment:
>
> mysql5-server is going away. If these changes are to be incorporated, it
> would be into the mysql51 / mysql55 / percona / mariadb ports.
Understood.
> However, this problem is hardly unique to the MySQL ports. Any port that
> installs a launchd plist could be said to benefit from such a script. Why
> not make it generic, so that it can control any launchd plist, and make it
> a separate port?
Interesting thought but to be really useful, I
think these kinds of scripts should be tailored
to check/warn on pre-conditions before executing
the stop/stop. For example, in the mythtv port
I'm working on, myth needs the MySQL database
server running before starting the myth backend
server. 99% of the time, the db server will be
on the same machine as the myth backend. My
stop/start script for Myth checks and reports
whether MySQL is running on the local machine but
allows the user to (try to) start mythbackend
even if it isn't running. Similarly, myth comes
with a utility program that checks to see if the
backend is busy: recording a program,
transcoding, etc. My stop/start script warns the
user if the backend is busy but still allows the
user to stop the backend, regardless.
With these database managers, is there some way
to check whether the system is busy? Maybe a way
to lock out new connections while existing ones
finish? I suppose that ought to be incorporated
in the stop/start script.
Therefore, I think some kind of generic
script-generating process would likely be overly
complicated if it was built to handle various
combinations of stop/stop pre-conditions. Eg
MAMP?
> Perhaps you even want to simply use one of the existing launchd management
> programs that exist, such as
> [http://www.macports.org/ports.php?by=name&substr=lingon lingon].
I didn't realize Lingon had risen from the dead!
;) Still, it doesn't quite address the goal I
had.
>--
>Ticket URL: <https://trac.macports.org/ticket/35183#comment:6>
>MacPorts <http://www.macports.org/>
>Ports system for Mac OS
I'm OK if this isn't committed. I've run MySQL
for 6 or 7 years, supporting Myth, and there have
been very few times that I've needed to shut down
the database. The Myth backend, OTOH, has to be
stopped before changing certain settings so a
stop/start script will help more there.
Craig
More information about the macports-dev
mailing list