Database Reference
In-Depth Information
For each version of MySQL, there are a few binary installation packages that you can
download: the
MySQL Server
, the
Shared Components
, the
Compatibility Libraries
,
Cli-
ent Utilities
,
Embedded
, and the
Test Suite
. The most important ones are the
Server
, the
Client Utilities
, and the
Shared Components
. In addition to these main packages, you may
also want to install the one named
Shared Libraries
. It provides the files necessary for in-
teracting with MySQL from programming languages such as PHP, Perl, and C. The other
packages are for advanced or special needs that won't be discussed in this topic and that
you may not need to learn until you're a more advanced MySQL developer.
The naming scheme for these packages is generally
MySQL-server-
version
.rpm
,
MySQL-client-
version
.rpm
and
MySQL-shared-
version
.rpm
, where
version
is the
actual version number. The corresponding package names for Debian-based distributions
end in
.deb
instead of
.rpm
.
To install .rpm files after downloading them to your server, you can usethe
rpm
utility or
something more comprehensive like
yum
.
yum
is betterabout making sure you're not in-
stalling software that conflicts with other things on your server. It also upgrades and in-
stalls anything that might be missing on your server. In addition, it can be used to upgrade
MySQL for newer editions as they become available. On Debian-basedsystems,
apt-get
is
similar to
yum
. For MySQL, Oracle provides
a yum repository
and
an apt repository
.
For
MariaDB, there is
a repository configuration tool
for each operating system.
To install the binary installation files for MySQL using
yum
, you would enter something
like the following from the command line on the server:
yum install MySQL-server-
version
.rpm \
MySQL-client-
version
.rpm MySQL-shared-
version
.rpm
You would, of course, modify the names of the RPM or DEB files to the precise name of
the packages you want to install. The
yum
utility will take you through the installation
steps, asking you to confirm the installation, any removals of conflicting software, and
any upgrades needed. Unless the server is a critical one for use in business, you can prob-
ably agree to let it do what it wants.
To install the binary installation files for MariaDB using
yum
, you would enter something
like the following from the command line on the server:
yum install MariaDB-server MariaDB-client
To install MySQL or MariaDB using the
rpm
utility, enter something like the following
from the command line in the directory where the RPM files are located:
rpm -ivh MySQL-server-
version
.rpm \
MySQL-client-
version
.rpm MySQL-shared-
version
.rpm