MySQL + Leopard: startup item pkg problems
Posted by jacqui maher on February 15, 2008 at 09:46 PM
I recently did a clean installation of Leopard after finding that my upgraded-to-leopard mac was having all sorts of issues - basically things got really slow. It got to the point that it was close to impossible for me to get any work done between the ever-present pinwheel and my growing frustration.
Things are a lot better now with Leopard. However, I’ve had to do some things differently while getting setup with the various programs and servers I need for development.
Here’s a relatively minor one that I dind’t find too many blog posts about, so I figured I would write one up quickly in case anyone else runs into this issue.
The MySQL disk images don’t install the startup program in the same place on Leopard that they did in previous versions of OSX. According to the docs:
If you want MySQL to start automatically during system startup, you also need to install the MySQL Startup Item. It is part of the Mac OS X installation disk images as a separate installation package. Simply double-click the MySQLStartupItem.pkg icon and follow the instructions to install it. The Startup Item need be installed only once. There is no need to install it each time you upgrade the MySQL package later.
The Startup Item for MySQL is installed into /Library/StartupItems/MySQLCOM. (Before MySQL 4.1.2, the location was /Library/StartupItems/MySQL, but that collided with the MySQL Startup Item installed by Mac OS X Server.) Startup Item installation adds a variable MYSQLCOM=-YES- to the system configuration file /etc/hostconfig. If you want to disable the automatic startup of MySQL, simply change this variable to MYSQLCOM=-NO-.
(from http://dev.mysql.com/doc/refman/5.0/en/mac-os-x-installation.html)
I installed MySQL using the mysql-5.0.51a-osx10.4-i686.pkg and the MySQLStartupItem.pkg, along with the MySQL.prefPane. I noticed that MySQL was not starting up when I booted my computer. I also noticed that the prefPane wasn’t starting or stopping the server.
The problem? The startup item is not being installed by that MySQLStartupItem.pkg - I’m not sure that installer does anything at all to be honest. The MySQL server installer, otoh, installs the startup item in /usr/local/MySQLCOM
Here’s what to do to fix it:
1. move the MySQLCOM directory into right location:
1 $ mv /usr/local/MySQLCOM/ /Library/StartupItems/
This will get MySQL starting up when your OS does. The prefPane start/stop button still won’t work though, so…
2. You can try downloading an alternate prefPane. I grabbed this one: http://creativeeyes.at/tools/mysqlpp.php
However, I couldn’t get it to install. The prefPane isn’t that important to me though, as I’m fine with starting up the server from the command line. If you moved your startup item to the /Library/StartupItems directory, you can just do this:
1 $ /Library/StartupItems/MySQLCOM/MySQLCOM start
2 Starting MySQL database server
You can make an alias to that command for brevity’s sake too:
1 alias start_mysql="/Library/StartupItems/MySQLCOM/MySQLCOM start"
Stick that in your .profile, source ~/.profile, and you’re set.
Hope this helps.
Comments
There are 2 comments on this post. Post yours →
i looked through your blog and linked in profile. I fell you would be a great asset for the company I am recruiting for. They need an experienced Ruby on Rails Developer with your personality.
please call or email
Thanks
RObert
212 444 1649
Rather than moving /usr/local/MySQLCOM to /Library/StartupItems it is more elegant simply to create a symbolic link to it. Open a terminal window and run: sudo ln -s /usr/local/MySQLCOM /Library/StartupItems/MySQLCOM
Hey presto, you’ve not changed your installation but the startup item is now present.
Post a comment
Required fields in bold.