port select and load/unload was Re: mysql55

Bradley Giesbrecht pixilla at macports.org
Tue Apr 3 13:52:34 PDT 2012


On Apr 3, 2012, at 12:59 PM, Chris Janton wrote:

> On 2012-04-02 , at 10:45 , Ryan Schmidt wrote:
>> 
>> Good question. I don't know if we've ever thought about whether launchd plists should be managed by port select. I don't have a particular opinion about whether it would be useful or not, but if you think it is, maybe others do too.
>> 
>> One potentially problematic scenario to consider, if we were to do that, is this: user selects mysql51, user uses your hypothetical "port load mysql-server" to start mysql51, user selects mysql55. Now mysql51 is still running, and the launchd id corresponding to it is mysql-server, but the launchd plist that's in place at the id mysql-server no longer refers to mysql51; it now refers to mysql55. So how do you stop the mysql51 server? You can't. You wouldn't have this problem if you had used "port load mysql51-server" in the first place, because you could then just "port unload mysql51-server" later to unload it.
>> 
>> Admittedly it's pretty similar to another problem we already have: user installs port, user loads port, user uninstalls port; now the server is running but the plist that would let you stop it has been deleted.
> 
> I simply wasn't sure if the 'port select' mechanism was intended to be quite so far reaching.
> 
> As an 'administrator' I should know which applications I have running as daemons, so making me keep track of them is what I would expect.
> 
> I think that it is perfectly acceptable that I should be able to do
> 
>  sudo port unload mysql5-server
>  sudo port load mysql55-server
> 
> as part of what I need to do to change versions.

If you want to access that same databases you may want to move your databases from their default location and make changes to the socket and datadir vars in etc/mysql5/my.cnf and etc/mysql55/my.cnf. This is what I have done to allow test the various mysqls, mysql55, percona and mariadb against the same databases. Of course, you do not want to run them both at the same time if you point them at the same datadir and socket.

There could be some issues changing versions. I believe there are changes to the databases mysql uses. I believe mysql 5.1 had problems attempting to access the performance_schema database.

Regards,
Bradley Giesbrecht (pixilla)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2763 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-users/attachments/20120403/7fb0f1db/attachment.bin>


More information about the macports-users mailing list