The recommended way to install MySQL on RPM-based Linux
distributions is by using the RPM packages. The RPMs that we
provide to the community should work on all versions of Linux that
support RPM packages and use
glibc 2.3. We also
provide RPMs with binaries that are statically linked to a patched
glibc 2.2, but only for the x86
(32-bit) architecture. To obtain RPM packages, see
Section 2.1.3, “How to Get MySQL”.
For non-RPM Linux distributions, you can install MySQL using a
.tar.gz package. See
Section 2.8, “Installing MySQL from Generic Binaries on Other Unix-Like Systems”.
We do provide some platform-specific RPMs; the difference between a platform-specific RPM and a generic RPM is that a platform-specific RPM is built on the targeted platform and is linked dynamically whereas a generic RPM is linked statically with LinuxThreads.
RPM distributions of MySQL are also provided by other vendors. Be aware that they may differ from those built by us in features, capabilities, and conventions (including communication setup), and that the instructions in this manual do not necessarily apply to installing them. The vendor's instructions should be consulted instead.
If you have problems with an RPM file (for example, if you receive
Sorry, the host
'), see Section 18.104.22.168, “Linux Binary Distribution Notes”.
xxxx' could not be looked
In most cases, you need to install only the
MySQL-client packages to get a functional MySQL
installation. The other packages are not required for a standard
installation. If you want to run a MySQL-Max server that has
additional capabilities, you should also install the
MySQL-Max RPM. However, you should do so only
after installing the
MySQL-server RPM. See
Section 5.2, “The mysqld-max Extended MySQL Server”.
For upgrades, if your installation was originally produced by installing multiple RPM packages, it is best to upgrade all the packages, not just some. For example, if you previously installed the server and client RPMs, do not upgrade just the server RPM.
If you get a dependency failure when trying to install the MySQL
4.0 packages (for example,
error: removing these packages
would break dependencies: libmysqlclient.so.10 is needed by
...), you should also install the
MySQL-shared-compat package, which includes
both the shared libraries for backward compatibility
libmysqlclient.so.12 for MySQL 4.0 and
libmysqlclient.so.10 for MySQL 3.23).
Some Linux distributions still ship with MySQL 3.23 and they
usually link applications dynamically to save disk space. If these
shared libraries are in a separate package (for example,
MySQL-shared), it is sufficient to simply leave
this package installed and just upgrade the MySQL server and
client packages (which are statically linked and do not depend on
the shared libraries). For distributions that include the shared
libraries in the same package as the MySQL server (for example,
Red Hat Linux), you could either install our 3.23
MySQL-shared RPM, or use the
MySQL-shared-compat package instead. (Do not
The RPM packages shown in the following list are available. The
names shown here use a suffix of
.glibc23.i386.rpm, but particular packages
can have different suffixes, as described later.
The MySQL server. You need this unless you only want to connect to a MySQL server running on another machine.
Note: Server RPM files were called
before MySQL 4.0.10. That is, they did not have
-server in the name.
The MySQL-Max server. This server has additional capabilities
that the one provided in the
RPM does not. You must install the
MySQL-server RPM first, because the
MySQL-Max RPM depends on it.
The standard MySQL client programs. You probably always want to install this package.
Tests and benchmarks. Requires Perl and the
The libraries and include files that are needed if you want to compile other MySQL clients, such as the Perl modules.
This package contains debugging information.
debuginfo RPMs are never needed to use
MySQL software; this is true both for the server and for
client programs. However, they contain additional information
that might be needed by a debugger to analyze a crash.
This package contains the shared libraries
libmysqlclient.so*) that certain languages
and applications need to dynamically load and use MySQL. It
contains single-threaded and thread-safe libraries. If you
install this package, do not install the
This package includes the shared libraries for MySQL 3.23,
4.0, and so on, up to the current release. It contains
single-threaded and thread-safe libraries. Install this
package instead of
MySQL-shared if you have
applications installed that are dynamically linked against
older versions of MySQL but you want to upgrade to the current
version without breaking the library dependencies. This
package has been available since MySQL 4.0.13.
The embedded MySQL server library (available as of MySQL 4.0).
Packages that contain additional files for MySQL Cluster installations.
MySQL-clustertools RPM requires a
working installation of perl and the
HTML::Template packages. See
Section 2.14, “Perl Installation Notes”, and
Section 15.4.18, “ndb_size.pl — NDBCLUSTER Size Requirement Estimator”, for
This contains the source code for all of the previous packages. It can also be used to rebuild the RPMs on other architectures (for example, Alpha or SPARC).
The suffix of RPM package names (following the
VERSION value) has the following
CPU values indicate the type of system
for which the package is built.
PLATFORM, if present, indicates the
CPU indicates the
processor type or family.
PLATFORM value is missing (for
the package is statically linked against a version of
glibc 2.2 that has been patched to handle
larger numbers of threads with larger stack sizes than the stock
library. (The exception is that MySQL-Max RPMs are always
PLATFORM is present, the package is
dynamically linked against
glibc 2.3 and the
PLATFORM value indicates whether the
package is platform independent or intended for a specific
platform, as shown in the following table.
|Platform independent, should run on any Linux distribution that supports
|Red Hat Enterprise Linux 3 or 4|
|SuSE Linux Enterprise Server 9 or 10|
CPU value indicates the processor
type or family for which the package is built.
|Intended Processor Type or Family|
|x86 processor, 386 and up|
|x86 processor, Pentium and up|
|64-bit x86 processor|
|Itanium (IA-64) processor|
To see all files in an RPM package (for example, a
MySQL-server RPM), run a command like this:
rpm -qpl MySQL-server-
To perform a standard minimal installation, install the server and client RPMs:
rpm -i MySQL-server-shell>
rpm -i MySQL-client-
To install only the client programs, install just the client RPM:
rpm -i MySQL-client-
RPM provides a feature to verify the integrity and authenticity of
packages before installing them. If you would like to learn more
about this feature, see
Section 2.1.4, “Verifying Package Integrity Using MD5 Checksums or
The server RPM places data under the
/var/lib/mysql directory. The RPM also
creates a login account for a user named
(if one does not exist) to use for running the MySQL server, and
creates the appropriate entries in
/etc/init.d/ to start the server
automatically at boot time. (This means that if you have performed
a previous installation and have made changes to its startup
script, you may want to make a copy of the script so that you do
not lose it when you install a newer RPM.) See
Section 22.214.171.124, “Starting and Stopping MySQL Automatically”, for more information on how
MySQL can be started automatically on system startup.
If the RPM files that you install include
MySQL-server, the mysqld
server should be up and running after installation. You should be
able to start using MySQL.
If something goes wrong, you can find more information in the binary installation section. See Section 2.8, “Installing MySQL from Generic Binaries on Other Unix-Like Systems”.
The accounts that are listed in the MySQL grant tables initially have no passwords. After starting the server, you should set up passwords for them using the instructions in Section 2.10, “Postinstallation Setup and Testing”.
During RPM installation, a user named
a group named
mysql are created on the system.
This is done using the useradd,
groupadd, and usermod
commands. Those commands require appropriate administrative
privileges, which is ensured for locally managed users and groups
(as listed in the
/etc/group files) by the RPM installation
process being run by
If you log in as the
mysql user, you may find
that MySQL displays “Invalid (old?) table or database
name” errors that mention
similar files created by MySQL or operating system utilities. You
can safely ignore these error messages or remove the files or
directories that cause them if you do not need them.
For nonlocal user management (LDAP, NIS, and so forth), the administrative tools may require additional authentication (such as a password), and will fail if the installing user does not provide this authentication. Even if they fail, the RPM installation will not abort but succeed, and this is intentional. If they failed, some of the intended transfer of ownership may be missing, and it is recommended that the system administrator then manually ensures some appropriate user andgroup exists and manually transfers ownership following the actions in the RPM spec file.