Database Reference
In-Depth Information
user named
mysql
before installing MySQL. Oracle's MySQL package automatically cre-
ates a user called
_mysql
.
Binary file packages (DMG files)are available for installing MySQL. For Mac servers
that do not have a GUI or a desktop manager, or for when you want toinstall it remotely,
file or a TAR file, be sure to download the package related to the type of processor on
your server (e.g., 32-bit or 64-bit), and for the minimum version of the server's operating
system (e.g., Mac OS X, version 10.6 or higher).
If an older version of MySQL is already installed on your server, you will need to shut
down the MySQL service before installing and running the newer version or replacing it
with MariaDB. You can do this with the MySQL Manager Application, which is a GUI
application that was probably installed when the operating system was first installed along
with MySQL. It's typically installed on recent versions of Mac OS X by default. If your
server doesn't have the MySQL Manager Application, you can enter the following from
the command line to shut down the MySQL service:
/usr/sbin/mysqladmin -u root -p shutdown
If you've never used MySQL and didn't set the password, it's probably blank. When
you're prompted for it after entering the preceding command, just press the Enter key.
To install the MySQL package file, from the Finder desktop manager, double-click on the
disk image file (the DMG file) that you downloaded. This will reveal the disk image file's
contents. Look for the PKG files; there will be two. Double-click on the one named
mysql-
version
.pkg(e.g.,
mysql-5.5.29-osx10.6-x86.pkg
). This will begin the installa-
tion program. The installer will take you through the installation steps from there. The de-
fault settings are recommended for most users and developers.
To have MySQL started at boot time, adda
startup item
. Within the disk image file that
you downloaded, you should see an icon labeledMySQLStartupItem.pkg. Just double-
click it, and it will create a
startup item
for MySQL. You should also install the MySQL
preferences pane so that you can start and stop MySQL easily from Systems Preferences
in the Mac system, as well as set it to start automatically at start up time. To do this, click
on the icon labeledMySQL.prefPane. If you have problems using the installer, read the
ReadMe.txt
file included in the DMG image file.
There is not yet an official installer for MariaDB on a Mac machine. However, you can
use
homebrew
to download and install the needed packages, including required libraries.
The
homebrew
utility worksmuch like
yum
does on Linux systems, but is made for Mac