MySQL Prep
October 11, 1999
You're going to need the MySQL distribution of course. If
this comes as news then the remainder of this article
may be aimed a tad high. First, locate your closest
MySQL mirror site and bookmark it as your MySQL home page.
From there, proceed to the Downloads page and, assuming
you are on a Unix system, turn your attention to the link
named "Downloads for MySQL 3.22 versions" and
follow it right along. In the future, this page may recommend
a newer version of the software but at the time of
writing 3.22 is the newest stable release.
Confused yet? The MySQL distribution is a suite of programs,
namely the server and client(s); furthermore, this
suite is available in a variety of packaged formats. You'll
have to decide which format is right for your environment,
which is a combination of your operating system and your
personal tolerance levels. Roughly, there are three formats
for the MySQL suite:
-
Tarball: This archive contains the source code for the MySQL
server and supporting client utilities. If you
are comfortable compiling and installing Unix software
distributions you can download this tarball. Compiling MySQL
is not difficult on a properly configured Unix system, if
you follow the included instructions, but novices who
run into difficulties with the compilation may feel lost at
sea.
-
Users of RedHat Linux can take advantage of the RPM
architecture -- which basically allows you to install and
uninstall software packages in a (somewhat) user friendly
manner -- can download the server RPM and client RPM
files. If you're on PC hardware (Intel/AMD) then choose the
i386 RPM's. The advantage of using RPM's is that the
installation is all pre-configured and easily undone. The
disadvantage is that you have no say as to where the
various files and programs are placed in your system.
-
Standard binary distributions contain the MySQL software
already compiled for specific platform architectures.
You can download one of these distributions if you are using
a supported platform; for example, a user with a Pentium
PC running Linux can download the linux-gnu on i686
distribution. RedHat Linux users can stick with RPM's if they
prefer, or use one of these standard binary distributions.
Once you have the MySQL distribution installed, you'll be
able to find -- somewhere on your system depending
on the installation -- a mysql subdirectory within
which there is, among other things, a bin folder
with all the executables. The noteworthy executables in
your mysql/bin directory should include mysqld
(the MySQL server), mysql (an interactive
command-driven client), as well as other helpful utilities,
such as the aforementioned mysqlimport. The core of
this system, though, is mysqld, since is the server,
the Big Daddy.
With a fresh MySQL installation, the first thing you must do
is run the script mysql_install_db located
in mysql/scripts. This script will briefly launch the
server and establish "grant tables" -- a
security model that we'll discuss shortly. The server will
then exit and MySQL will be setup for initial use.
You may wish to have mysqld automatically startup
when you boot your system. Although the exact details
for starting servers with the system vary from system to
system, read the mysql.server file located in
mysql/support files, which contains clues on
triggering mysqld with boot-up.
The MySQL Model
The Perl You Need to Know
Privileged MySQL
|