Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MacPorts doesn't install org.macports.mysql5.plist with mysql5 +server

Tags:

macos

macports

The last two times I've used MacPorts to install mysql5 +server, the plist isn't installed that allows me to have MySQL start on launch. I can't remember what, if anything, I did the on the last install and I can't seem to find a way to get it installed. Am I missing something? How can I either get the plist file (the only way I know of to start MySQL automatically) or start MySQL automatically in another way?

Thanks.

UPDATE: I still haven't found an answer anywhere, but I installed the files manually. One of my machines with an older install had the relevant files so I SCP'd them to my new machine, created the appropriate symlink in /Library/LaunchDaemons and executed the command to load the plist file. Everything's fine for me now, but that doesn't help anyone else. If anyone needs these files and/or instructions, contact me through http://robwilkerson.org/contact and I'll be happy to provide them since I can't upload them here.

like image 849
Rob Wilkerson Avatar asked Jul 04 '09 00:07

Rob Wilkerson


3 Answers

The mysql5 +server package variant in MacPorts is obsolete, and is superseded by the mysql5-server package, which you install in addition to mysql5. This allows you to build it after the fact, instead of re-compiling the entire mysql5 package with +server.

I'd suggest to just remove your old mysql5 +server, and install using the following.

sudo port install mysql5-server

That'll build both the required mysql5 and mysql5-server packages for you, and you'll have the mysql5 plist file in /Library/LaunchDaemons. Also note that you no longer need to symlink your mysqld.sock to /tmp/mysql.sock.

like image 117
Michael Richards Avatar answered Nov 07 '22 02:11

Michael Richards


to install mysql correctly on macports: http://www.jasonrowland.com/2009/10/install-mysql5-on-snow-leopard-using-macports/

like image 41
mtay Avatar answered Nov 07 '22 02:11

mtay


Yes it is true. Many existing blog are still using the out-dated link to install mysql.

Outdated macport command line:

$ sudo port install mysql5 +server
like image 1
Bess Avatar answered Nov 07 '22 02:11

Bess