Chapter 14. MySQL and PostgreSQL
Although there are some great binary distributions for MySQL and PostgreSQL, both build out of the box on Mac OS X. This chapter describes how to install them from source and get them set up so you can start playing with them. Fink is a good first stop for MySQL or PostgreSQL, since you can use it to install a binary build or compile from source.
You can also get MySQL as a binary package from MySQL AB (http://www.mysql.com), as well as Server Logistics (http://www.serverlogistics.com/). Server Logistics offers a selection of open source packages, one of which is Complete MySQL (http://www.serverlogistics.com/mysql.php), which includes the MySQL server, a System Preferences pane for MySQL, ODBC/JDBC drivers, and documentation.
MySQL
To get the source distribution of
MySQL, download the latest
tarball from http://www.mysql.com/downloads/. At the time
of this writing, the latest production release was the
4.0.x series; we downloaded
mysql-4.0.16.tar.gz.
Compiling MySQL
To compile MySQL from source:
Extract the tarball:
$
cd ~/src$tar xvfz ~/Desktop/mysql-4.0.16.tar.gzChange to the top-level directory that
tarcreated and run the configure script. We suggest specifying a prefix of/usr/local/mysqlso it stays out the way of any other binaries you have in/usr/local.$
cd mysql-4.0.16$./configure --prefix=/usr/local/mysqlNext, type
maketo compile MySQL. Go get a few cups of coffee (compiling could take 30 minutes or more).
Installing MySQL
If the compilation ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access