2 Installation
I
NSTALLATION
CocoaMySQL
If you are using Mac OS X, I strongly recommend the CocoaMySQL application. It is a
fairly simple and reliable means of connecting to a MySQL database without having to use
the command line. We'll do a little bit of command line work in this tutorial in case you
need to import or work with data from behind a firewall, but only a little. If at all possible, I
recommend using CocoaMySQL or a program similar to it, to manage your MySQL
databases.
Download CocoaMySQL from http://cocoamysql.sourceforge.net/. CocoaMySQL requires
Mac OS X 10.2 or higher. There is also another version of the software, Cocoa MySQL
SBG, at http://theonline.org/cocoamysql/. This version probably requires Mac OS X 10.3
and MySQL 4.x, but it also offers a few extra features.
The Command Line
If you are not using CocoaMySQL, you'll need to use some other interface to MySQL, or
use the command line mysql application that comes with MySQL. With the Mac OS X
installation, the mysql install is in /usr/local/mysql. You'll use the mysql command line by
going to the terminal (in your Utilities folder) and typing:
/usr/local/mysql/bin/mysql h localhost u
USERNAME
p
Replace username with the username you created or were given by your database
administrator.
The big difference between the statements in this tutorial and what you'll type is that you
need to always end your statements with semicolons.
MySQL
We'll be installing the full MySQL server on your desktop computer. This portion of the
tutorial is geared pretty much exclusively to the Macintosh. Installation of MySQL on Mac
OS X is quick and easy.
If you are using Linux, you may well have MySQL already installed on your system. Look at
your instructions or manual (depending on your installation) to see how to enable it or access
it.
Download package
MySQL is free software. You can download it at http://dev.mysql.com/downloads/. As I
write this, the current recommended version is MySQL 4.1. Click on that. If you are going
to install the Mac OS X version, scroll down to the Mac OS X downloads section, and
download the Standard Installer package for your version of Mac OS X. For now, you do
not want either of the Max or Debug versions.