Microsoft Word - Sam's Teach Yourself MySQL in 21 Days - SAMS.doc

(singke) #1

binaries can be found on the CD-ROM that accompanies this book. This just saves you a step in the
installation process. Please refer to your system's documentation on how to access the CD-ROM.


MySQL is always undergoing modifications and enhancements. The newest releases are the Alpha
versions. The Alphas contain the newest features of MySQL. They also contain some fixes from the
previous versions. They have been tested using TcX's testing modules but have not been tested as
thoroughly as possible. TcX recommends using the most current production release. These editions
have been tested and are used in production around the world.

MySQL runs on many platforms, and binaries are available for most of them. Binaries are the result of
compiling the source code. This is by far the easiest way of acquiring MySQL. The alternative is
downloading the source code for your platform and then compiling it. This can get a little more involved.
It requires that you have all the right libraries as well as a compiler. This is beyond the scope of this
book. If you absolutely must compile the source code, read the documentation thoroughly. If you have
any problems, check out the MySQL mailing lists. They are an invaluable information source for MySQL
administrators. Members of the development team read the postings regularly and are willing to answer
or provide guidance on most of them.
To download the Linux binary, go to a MySQL mirror site. A mirror site is an exact replica of an existing
Web site that is on another server. This helps distribute the load and traffic of the main Web server and
allows others to use the Web server without problems. After selecting a mirror site, click the binary that
you need.

This book will cover the installation of the Linux binary as well as the shareware version of the Windows
binary.

Installation for Linux


After the download has completed, you will have a zipped tar file named mysql-3.22.23b-pc-linux-
gnu-i686.tar.gz. It is recommended that you unpack this in /usr/local—all the defaults point to this
location. You may need to have root-level privileges to modify the /usr directory. It has been my
experience that it is best to install MySQL as root; there seem to be fewer ownership problems that way. To
unpack the file as explained here, type the following from the command line:


cd /usr/local
gunzip < mysql-3.22.23b-pc-linux-gnu-i686.tar.gz | tar xvf –
ln -s mysql-3.22.23b-pc-linux-gnu-i686 mysql

This is just an example—the filename may change when new versions are distributed. This will unpack
the MySQL binary and create the directory structure. The last line creates a symbolic link to that
directory. Change to that directory and do a list:
cd mysql
ls

You should see the following results:
ChangeLog bin lib mysql-for-dummies
INSTALL-BINARY configure manual.htm scripts
PUBLIC data manual.txt share
README include manual_toc.html sql-bench
Support-files tests

Installation for Windows


The Windows is very similar to a Linux installation. Select a mirror site from which to download your
Windows binary. The Windows executable is a self-installing WinZip file. After the download has finished,
double-clicking the zipped file will begin the extraction/installation routine. After it has installed and performed
cleanup, you will be returned to your desktop.
To see the new files, open Windows Explorer and navigate to the C:\ directory. You should see
something similar to Figure 2.1.

Free download pdf