Databases Reference
In-Depth Information
Figure 2-17. The contents of the MySQL AB Mac OS X installer package
Next, double-click on the MySQL.prefPane item and install it. This adds a MySQL
configuration entry to the System Preferences; from the System Preferences window,
you can manually start and stop the MySQL server, and also select whether you want
the server to be automatically started each time the system boots.
Finally, if you want the MySQL server to be started and stopped automatically each
time the computer is started or stopped, double-click on the MySQLStartupItem.pkg
item and install this too.
Configuring the installed server
For security reasons, it's a good idea to have the MySQL server run under its own
username and group, rather than under the superuser account. If something goes wrong
with the server, or an attacker gains control of the server, the damage will be restricted
to the MySQL user rather than the whole system. Mac OS X comes with a mysql user
and group already defined. You can check this using the graphical NetInfo Manager
tool, or from the shell prompt.
To check using the NetInfo Manager, double-click on the NetInfo Manager icon in the
Utilities folder under the Applications group, as shown in Figure 2-18. Then, select
“groups” and scroll down to make sure that there is an entry for the mysql group, as
shown in Figure 2-19. Similarly, you can select “users” and scroll down to see that there
is an entry for the mysql user there too.
You can instead check these settings from the shell prompt. To do this, open a terminal
window and use the grep command to search for the word mysql in the system's list of
users (the /etc/passwd file) and groups (the /etc/group file):
$ grep mysql /etc/passwd /etc/group
/etc/passwd:mysql:*:74:74:MySQL Server:/var/empty:/usr/bin/false
/etc/group:mysql:*:74:
 
Search WWH ::




Custom Search