On Apr 1, 2012, at 12:22, Chris Janton wrote:

> Decided to give mysql55 a go. Switching from mysql5
> 
> Everything appeared to work just fine with the build.
> 
> deactivated mysql5 and mysql5-server (forced due to some dependencies)
> 
> installed mysql55 and mysql55-server
> 
> port select mysql mysql55
> 
> mysql won't start due to the following problems, both stemming from my.cnf 
> defaults that worked previously
> 
> [mysqld]
> pid_file=/var/mysql
> 
> If this line is included mysql fails to start complaining that /var/mysql is 
> a directory, which is a true statement. If I comment out, or make
> 'pid_file=' then the pid file is created in the data directory. That's OK, I 
> guess. I don't know why it stopped working.

The documentation says pid-file should be "The path name of the process ID 
file" (not the path of the directory it's in):

http://dev.mysql.com/doc/refman/5.5/en/mysqld-safe.html#option_mysqld_safe_pid-file

Perhaps mysql has improved its error reporting in this regard.


> [mysqld]
> federated
> 
> If this line is included (to enable the FEDERATED engine) mysql fails to 
> start complaining about 'unknown option --federated'
> If I comment it out, mysql starts.
> 
> How do I enable the FEDERATED engine in this case? Something missing in the 
> build that allows it?

My understanding from the documentation is that that should have worked: "The 
FEDERATED storage engine is not enabled by default in the running server; to 
enable FEDERATED, you must start the MySQL server binary using the --federated 
option." (Or presumably equivalently, putting "federated" in the my.cnf file)

http://dev.mysql.com/doc/refman/5.5/en/federated-storage-engine.html

Before refreshing my memory with the documentation, I thought I remembered from 
the early days of the 5.5/5.2 series that federated was always on. Maybe that 
changed at some point and we have to do something else now to enable it. If you 
can find out what that is, let us know.


> After getting mysqld to start I did
> 
>  sudo port load mysql55-server
> 
> Should 'port select mysql mysql55' or 'port select mysql-server 
> mysql55-server' make the commands
> 
>  port load mysql-server
> 
> choose the proper engine to start? or should I just deal with 
> unloading/loading the server specifically?

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.


Perhaps both problems would be solved by making MacPorts refuse to remove a 
plist if it is loaded.


This is related to:

https://trac.macports.org/ticket/23677

_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users

Reply via email to