If you're from a non-English speaking country like me, the files in the Resources folder (see the other items in /System/Library/StartupItems for reference) are interesting, since you can translate the message on the startup box into your language. Play around with it, I'm too tired now -) I was lazy and put some requirements in there to be safe, but I guess "NetInfo" is all that's needed. Choosing "Resolver" for "Requires" is not quite the right thing, but it does the trick, since NetInfo and Resolver are provided by the same startup item. I change the MySQL user in my /etc/my.cnf file (simply add "user=mysql" below, look in the mysql dir for some sample config files), so I must make sure that NetInfo is loaded before the MySQL server, since NetInfo actually creates the users/groups (/etc/passwd is actually a dummy file).
To run MySQL server open System Preferences and go to MySQL. How to start and stop mysql from the command line on mac. Set the root password when prompted and note it down.
Download and run the installer and follow the steps to install MySQL database on your Mac. AppleShare needs Network, so it will be loaded after the item that "provides" (the other tag, see below) "Network". Head over to website and download the latest version of the MySQL Community Server. The "Requires" part is quite important, since the startup items are called depending on their requirements. I chose the Apache folder, since it's just another server. Just copy one of the StartupItem folders from /System/Library/StartupItems to /Library/StartupItems and change the file names, property file and the actual start script. I used the SSH login thingies from stepwise as starting pointĪctually it's really simple, no need to "touch" something -). After reboot, view processviewer or top in terminal and you should see mysqld and sh (for safe_mysqld) running!
Save your changes, quit Pico, exit the terminal, and reboot. % chmod 755 SQLThe last step is to edit the host config file: % pico /etc/hostconfigand enter the following line: SQLSERVER=-YES-i've put it between WEBSERVER and APPLETALK_HOSTNAME. % pico SQLand enter the following: #!/bin/sh You'll need to be doing all of this as root, so use your favorite method of becoming root.įirst, create the startup directory and files: % cd /Library/StartupItems NOTE: The '%' is the prompt character do not include it as part of the command! Read the rest of this article if you'd like your mySQL server to launch when you start your machine. We will also configure MySQL security options, adjusting authentication methods, and creating a new user. "It took some time, but it's working now." Here is how to install the MySQL server on Ubuntu. The following tutorial explains how to get mySQL (via safe_mysqld) started at system boot.