Installing MySQL on Mac OS X
96
Mac OS X Server Version
MySQL Version
10.2.3-10.2.6
3.23.53
10.3
4.0.14
10.3.2
4.0.16
10.4.0
4.1.10a
This manual section covers the installation of the official MySQL Mac OS X PKG only. Make sure to
read Apple's help information about installing MySQL: Run the “Help View” application, select “Mac OS
X Server” help, do a search for “MySQL,” and read the item entitled “Installing MySQL.”
For preinstalled versions of MySQL on Mac OS X Server, note especially that you should start
mysqld
with
safe_mysqld
instead of
mysqld_safe
if MySQL is older than version 4.0.
If you previously used Marc Liyanage's MySQL packages for Mac OS X from
http://www.entropy.ch
,
you can simply follow the update instructions for packages using the binary installation layout as given
on his pages.
If you are upgrading from Marc's 3.23.x versions or from the Mac OS X Server version of MySQL to
the official MySQL PKG, you also need to convert the existing MySQL privilege tables to the current
format, because some new security privileges have been added. See
Section 4.4.9, “
mysql_upgrade
— Check Tables for MySQL Upgrade”
.
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-
.
On Mac OS X Server, the default MySQL installation uses the variable
MYSQL
in the
/etc/
hostconfig
file. The MySQL Startup Item installer disables this variable by setting it to
MYSQL=-NO-
.
This avoids boot time conflicts with the
MYSQLCOM
variable used by the MySQL Startup Item. However,
it does not shut down a running MySQL server. You should do that yourself.
After the installation, you can start up MySQL by running the following commands in a terminal window.
You must have administrator privileges to perform this task.
If you have installed the Startup Item, use this command:
shell>
sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(Enter your password, if necessary)
(Press Control-D or enter "exit" to exit the shell)
If you do not use the Startup Item, enter the following command sequence:
shell>
cd /usr/local/mysql
shell>
sudo ./bin/mysqld_safe
(Enter your password, if necessary)
(Press Control-Z)
shell>
bg
(Press Control-D or enter "exit" to exit the shell)
You should be able to connect to the MySQL server, for example, by running
/usr/local/mysql/
bin/mysql
.
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...