In this chapter, I’m going to help add to those numbers, by taking you through the process of obtaining, installing, configuring, and testing the MySQL server on your workstation. This chapter covers installation of both binary and source versions on UNIX and Microsoft Windows, and it also explains the differences between the MySQL server versions available, with a view to helping you select the right one for your needs. Obtaining MySQLThe first order of business is to drop by the official MySQL web site (http://www.mysql.com/downloads/mysql.html) and get yourself a copy of the last stable release of the software. This isn’t necessarily as easy as it sounds—like ice-cream, MySQL comes in many flavors, and you’ll need to select the one that’s most appropriate for your needs. You’ll need to make two primary decisions when selecting which MySQL distribution to download and use:
MySQL AB currently makes the following two versions of the MySQL database server available on its web site:
Both these versions of MySQL are licensed under the GPL and may be freely downloaded and used under the terms of that license. In most cases, MySQL Standard is the version you should use—it’s the version used in all the examples in this book, and it’s stable, feature-rich, and well-suited for most common applications. You should select MySQL Max only if that version includes new features that you need or are keen to try out—or if you’re a geek with a penchant for living life on the bleeding edge all the time. Choosing Between Binary and Source DistributionsMySQL AB makes both source and binary distributions of the MySQL database server available for download on its web site. As of this writing, binary distributions are available for Linux, Solaris, FreeBSD, Mac OS X, Windows 95/98/2000/XP/NT/ ME, HP-UX, IBM AIX, SCO OpenUNIX, and SGI Irix, and source distributions are available for both Windows and UNIX platforms. In most cases, it’s preferable to use a precompiled binary distribution rather than a source distribution—MySQL AB puts in a lot of time and effort to create binary distributions for various platforms, and using these distributions is generally considered a Good Idea. These precompiled binary distributions are also easier to install than source
distributions, and they are optimized by MySQL’s developers to ensure maximum performance on the target systems. That said, for a number of possible reasons, a source distribution might work better for you than a binary distribution:
If you’re new to MySQL, I’d recommend that you go with a binary distribution— source distributions are typically used only by experienced developers who either need to tweak MySQL’s default values for their own purposes or who are interested in studying the source code to see how it works. Such users usually also have the time, inclination, and expertise to diagnose and troubleshoot compilation and configuration issues that may arise during the installation process. Once you’ve figured out which version of MySQL you need, point your browser to http://www.mysql.com/downloads/mysql.html and select the appropriate file from the choices available. The MySQL software is also mirrored on a number of other sites around the world, and you can obtain a list of mirrors from http://www.mysql .com/downloads/mirrors.html You can make your download more efficient by selecting the site that is geographically closest to you. Once your download is complete, save it to a directory on your hard drive and skip to the section titled “Installing and Configuring MySQL,” a bit later in this chapter.
Note that we will assume, throughout this chapter, that you are using MySQL version 4.0.15, and that all your downloads are saved in the /tmp (UNIX) or c:\temp (Windows) directory, and I will reference that directory in subsequent instructions. Installing and Configuring MySQLOnce you’ve got yourself a copy of MySQL, it’s time to install and configure it for your specific platform. This section includes information on how to do just that, for both Windows and UNIX platforms, using both binary and source distributions. It should be noted at the outset that this section is designed merely to provide an overview and general guide to the process of installing and configuring MySQL. It is not intended as a replacement for the installation documentation that ships with MySQL. If you encounter difficulties installing or configuring the various programs described here, drop by the MySQL web site or search the mailing lists for detailed troubleshooting information and advice.
blog comments powered by Disqus |