There are command line options for all my.cnf parameters. In its default configuration, mysqld will also read the /etc/my.cnf file during startup, but if you are like me and have all configuration in one place, you can add them right here in the ist. You can add various command-line options to mysqld if you like (check the MySQL documentation for all the options). If you edit the file after you submitted it to launchd via launchctl load, you should always remember to first execute a launchctl unload, check for user, group, and permissions, and then resubmit via launchctl load as in steps three and four above. You can modify the plist file to suit your needs. This example implements just a simple mysql daemon install. If not, check with Console.app for error messages from launchd with the tag. Afterwards, submit the job to launchd by typing sudo launchctl load.Copy (or move) this file to /Library/LaunchDaemons, and then change ownership and permissions in Terminal (supply your login password when asked):.Create the following plist file in your favorite text editor, or use the Property List Editor which comes with XCode, and save it as :.If you already have this StartupItem, remove it (it's located in /Library/StartupItems). It might offer to install the mentioned StartupItem do not do this. This will place a copy of mysql in /usr/local/mysql-version#, and create a link at /usr/local/mysql. Install the latest copy of mySQL (if not already installed) using the links above. Also being familiar with MySQL configuration might help. It assumes you are familiar with the Terminal, logged with an administrator account, and have basic knowledge of launchctl and ist files. So this hint is about replacing the StartupItem and the mysqld_safe script with a simple launchd job. That's a pretty ugly solution to start a server with launchd, and is actually discouraged by Apple. There are many hints out there to create a launchd job using the MySQL supplied launchd_safe, which is basically a shell script for starting, monitoring, and restarting mysqld. This works pretty well, except that Apple has marked StartupItems as depreciated since 10.4, noting that you should use launchd instead. They also offer to install a StartupItem to start the database server during boot. The first is that they include a preference pane for System Preferences, which doesn't work. This 10.4 version works perfectly well with 10.5, except for some minor inconveniences. The MySQL site offers a packaged version of MySQL 5.0.x for OS X 10.4 on their downloads page (current as of this posting: 5.0.51). I recently installed a copy of the MySQL database server on my Leopard machine.
0 Comments
Leave a Reply. |