4.6.1 Linux RPM

The recommended way to install MySQL on Linux is by using an RPM file. The MySQL RPMs are currently being built on a RedHat 5.2 system but should work on other versions of Linux that support rpm and use glibc.

If you have problems with an RPM file, for example Sorry, the host 'xxxx' could not be looked up, see 4.6.3.1 Linux notes.

The RPM files you may want to use are:

  • MySQL-VERSION.i386.rpm The MySQL server. You will need this unless you only want to connect to another MySQL server running on another machine.
  • MySQL-client-VERSION.i386.rpm The standard MySQL client programs. You probably always want to install this package.
  • MySQL-bench-VERSION.i386.rpm Tests and benchmarks. Requires Perl and msql-mysql-modules RPMs.
  • MySQL-devel-VERSION.i386.rpm Libraries and include files needed if you want to compile other MySQL clients, such as the Perl modules.
  • MySQL-VERSION.src.rpm This contains the source code for all of the above packages. It can also be used to try to build RPMs for other architectures (for example, Alpha or SPARC).

To see all files in an RPM package:

shell> rpm -qpl MySQL-VERSION.i386.rpm

To perform a standard minimal installation, run this command:

shell> rpm -i MySQL-VERSION.i386.rpm MySQL-client-VERSION.i386.rpm

To install just the client package:

shell> rpm -i MySQL-client-VERSION.i386.rpm

The RPM places data in `/var/lib/mysql'. The RPM also creates the appropriate entries in `/sbin/rc.d/' to start the server automatically at boot time. (This means that if you have performed a previous installation, you may want to make a copy of your previously-installed MySQL startup file if you made any changes to it, so you don't lose your changes.)

After installing the RPM file(s), go to the binary install section and use the instructions there, starting from the step that creates the MySQL grant tables. 4.6 Installer une version binaire de MySQL.