You can install MySQL on Mac OS X 10.3.x (“Panther”) or newer using a Mac OS X binary package in PKG format instead of the binary tarball distribution. Please note that older versions of Mac OS X (for example, 10.1.x or 10.2.x) are not supported by this package.
The package is located inside a disk image
(.dmg
) file that you first need to mount by
double-clicking its icon in the Finder. It should then mount the
image and display its contents.
Before proceeding with the installation, be sure to shut down all running MySQL server instances by either using the MySQL Manager Application (on Mac OS X Server) or via mysqladmin shutdown on the command line.
When installing from the package version, you should also install the MySQL Preference Pane, which will allow you to control the startup and execution of your MySQL server from System Preferences. For more information, see Section 2.7.3, “Installing and Using the MySQL Preference Pane”.
When installing using the package installer, the files are
installed into a directory within /usr/local
matching the name of the installation version and platform. For
example, the installer file
mysql-5.1.39-osx10.5-x86_64.pkg
installs
MySQL into /usr/local/mysql-5.1.39-osx10.5-x86_64
. The installation layout of the directory is as shown
in the following table:
Directory | Contents of Directory |
bin |
Client programs and the mysqld server |
data |
Log files, databases |
docs |
Manual in Info format |
include |
Include (header) files |
lib |
Libraries |
man |
Unix manual pages |
mysql-test |
MySQL test suite |
scripts |
Contains the mysql_install_db script |
share/mysql |
Error message files |
sql-bench |
Benchmarks |
support-files |
Scripts and sample configuration files |
/tmp/mysql.sock | The location of the MySQL Unix socket |
During the package installer process, a symbolic link from
/usr/local/mysql
to the version/platform
specific directory created during installation will be created
automatically.
Download and open the MySQL package installer, which is
provided on a disk image (.dmg
).
Double-click to open the disk image, which includes the main
MySQL installation package, the
MySQLStartupItem.pkg
installation
package, and the MySQL.prefPane
.
Double-click on the MySQL installer package. It will be named
according to the version of MySQL you have downloaded. For
example, if you have downloaded MySQL 5.1.39, double-click
mysql-5.1.39-osx10.5-x86.pkg
.
You will be presented with the openin installer dialog. Click Continue to begihn installation.
A copy of the installation instructions and other important information relevant to this installation are display. Click Continue .
If you have downloaded the community version of MySQL, you will be shown a copy of the relevent GNU General Public License. Click Continue .
Select the drive you want to use to install the MySQL Startup Item. The drive must have a valid, bootable, Mac OS X operating system installed. Click Continue.
You will be asked to confirm the details of the installation, including the space required for the installation. To change the drive on which the startup item is installed you can click either Go Back or Change Install Location.... To install the startup item, click Install.
Once the installation has been completed successfully, you will be given an Install Succeeded message.
Once you have completed the basic installation, you must complete the post-installation steps as specifed in Section 2.13, “Post-Installation Setup and Testing”.
For convenience, you may also want to install the Section 2.7.2, “Installing the MySQL Startup Item” and Section 2.7.3, “Installing and Using the MySQL Preference Pane”.
User Comments
This instruction says to run the post-installation script once the installer has finished.
However, I read elsewhere that the script is run automatically by the installer.
When I checked after installation (using mysql-5.1.39-osx10.5-x86_64.dmg), it seems the latter is the case, i.e. there is no need for he script to be run manually.
The instruction here must be corrected (unless it still applies to other packages then in mysql-5.1.39-osx10.5-x86_64.dmg).
Add your own comment.