I\'m trying to automatically start mysql 5.5.10 community server (gpl) on my mac pro. I\'ve read several threads on this forum. I\'m still baffled, because those threads r
You actuall have to create this file... Best way is with a symlink:
mkdir /Library/StartupItems/MySQLCOM
cd /Library/StartupItems/MySQLCOM/
ln -s /path/to/installation/mysql/support-files/mysql.server MySQLCOM
However I wouldnt recommend this. You should do it proper and use launchd
instead - this is the proper OS X way :-)
First create a plist at /Library/LaunchDaemons/com.mysql.mysqld.plist
Disabled
GroupName
_mysql
KeepAlive
Label
com.mysql.mysqld
Program
/usr/local/mysql/bin/mysqld
ProgramArguments
--user=_mysql
RunAtLoad
Umask
7
UserName
_mysql
WorkingDirectory
INSTALL_PATH/mysql
Then an adjust the permission:
sudo chown root /Library/LaunchDaemons/com.mysql.mysqld.plist
sudo chgrp wheel /Library/LaunchDaemons/com.mysql.mysqld.plist
sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysqld.plist
Now MySQL should be launched on startup. To test that everything works without rebooting you can run: sudo launchctl load com.mysql.mysqld.plist
then check your error logs for messages.
IF you need to add special args (like custom logs, cnf, etc..) you can do so by specifying them as
elements in the
element following
. The values of those
element should be the standard switches you would use with mysqld
.