For this example, we assume that all the RPM packages for Version
3.23.40 on an Intel Linux system will be installed. Also, assume the
following RPM files have been downloaded to
/tmp:
-
MySQL-3.23.40-1.i386.rpm
-
MySQL-client-3.23.40-1.i386.rpm
-
MySQL-devel-3.23.40-1.i386.rpm
-
MySQL-bench-3.23.40-1.i386.rpm
-
MySQL-shared-3.23.40-1.i386.rpm
Execute this sequence of commands to install them:
$ rpm -i /tmp/MySQL-3.23.40-1.i386.rpm
$ rpm -i /tmp/MySQL-client-3.23.40-1.i386.rpm
$ rpm -i /tmp/MySQL-devel-3.23.40-1.i386.rpm
$ rpm -i /tmp/MySQL-bench-3.23.40-1.i386.rpm
$ rpm -i /tmp/MySQL-shared-3.23.40-1.i386.rpm
The RPM creates the appropriate entries in
/etc/rc.d to automatically start and stop the
server at system boot and shutdown. The RPM also starts the
mysql server, so after the RPM install is
complete, you are ready to start using MySQL.
The RPM distributions place the files in different locations from the
tarball distributions. To examine an RPM to determine where the files
were placed, use the RPM query option:
$ rpm -qpl MySQL-version.i386.rpm
If you wish to determine the location but have discarded the RPM
files already, you can query the RPM database:
$ rpm -ql MySQL-version
Also note that the RPM places data in
/var/lib/data instead of
/usr/local/mysql/data.