Installing MariaDB from RPM Packages on Linux
The recommended way to install MariaDB 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. To obtain RPM packages, see , "How to Get MySQL".
For non-RPM Linux distributions, you can install MariaDB using a .tar.gz
package. See , "Installing MariaDB from Generic Binaries on Unix/Linux".
Installations created from our Linux RPM distributions result in files under the following system directories.
Table 2.11. MariaDB Installation Layout for Linux RPM
Directory | Contents of Directory |
---|---|
/usr/bin
| Client programs and scripts |
/usr/sbin
| The mysqld server |
/var/lib/mysql
| Log files, databases |
/usr/share/info
| Manual in Info format |
/usr/share/man
| Unix manual pages |
/usr/include/mysql
| Include (header) files |
/usr/lib/mysql
| Libraries |
/usr/share/mysql
| Miscellaneous support files, including error messages, character set files, sample configuration files, SQL for database installation |
/usr/share/sql-bench
| Benchmarks |
RPM distributions of MariaDB 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. Because of these differences, RPM packages built by us check whether such RPMs built by other vendors are installed. If so, the RPM does not install and produces a message explaining this.
In most cases, you need to install only the MySQL-server
and MySQL-client
packages to get a functional MariaDB installation. The other packages are not required for a standard installation.
RPMs for MariaDB Cluster. Standard MariaDB server RPMs built by MariaDB do not provide support for the NDBCLUSTER
storage engine.Important
When upgrading a MariaDB Cluster RPM installation, you must upgrade all installed RPMs, including the Server
and Client
RPMs.
For more information about installing MariaDB Cluster from RPMs, see MySQL Cluster Installation.
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 MariaDB 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 the shared libraries for older releases for backward compatibility.
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, described later.
MySQL-server-
VERSION
.glibc23.i386.rpm
The MariaDB server. You need this unless you only want to connect to a MariaDB server running on another machine.
MySQL-client-
VERSION
.glibc23.i386.rpm
The standard MariaDB client programs. You probably always want to install this package.
MySQL-devel-
VERSION
.glibc23.i386.rpm
The libraries and include files that are needed if you want to compile other MariaDB clients, such as the Perl modules.
MySQL-shared-
VERSION
.glibc23.i386.rpmThis 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.MySQL-shared-compat-
VERSION
.glibc23.i386.rpmThis package includes the shared libraries for older releases, but not the libraries for the current release. It contains single-threaded and thread-safe libraries. Install this package if you have applications installed that are dynamically linked against older versions of MariaDB but you want to upgrade to the current version without breaking the library dependencies.
MySQL-embedded-
VERSION
.glibc23.i386.rpmThe embedded MariaDB server library.
MySQL-test-
VERSION
.glibc23.i386.rpmThis package includes the MariaDB test suite.
MySQL-
VERSION
.src.rpmThis 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 syntax:
.PLATFORM
.CPU
.rpm
The PLATFORM
and CPU
values indicate the type of system for which the package is built. PLATFORM
indicates the platform and CPU
indicates the processor type or family.
All packages are dynamically linked against glibc
2.3. The PLATFORM
value indicates whether the package is platform independent or intended for a specific platform, as shown in the following table.
Table 2.12. MariaDB Linux Installation Packages
PLATFORM Value
| Intended Use |
---|---|
glibc23
| Platform independent, should run on any Linux distribution that supports glibc 2.3
|
rhel4 , rhel5
| Red Hat Enterprise Linux 4 or 5 |
el6
| Enterprise Linux 6 |
sles10 , sles11
| SuSE Linux Enterprise Server 10 or 11 |
In MariaDB 5.6, only glibc23
packages are available currently.
The CPU
value indicates the processor type or family for which the package is built.
Table 2.13. MariaDB Installation Packages for Linux CPU Identifier
CPU Value
| Intended Processor Type or Family |
---|---|
i386 , i586 , i686
| Pentium processor or better, 32 bit |
x86_64
| 64-bit x86 processor |
ia64
| Itanium (IA-64) processor |
To see all files in an RPM package (for example, a MySQL-server
RPM), run a command like this:
shell> rpm -qpl MySQL-server-VERSION
.glibc23.i386.rpm
To perform a standard minimal installation, install the server and client RPMs:
shell>rpm -i MySQL-server-
shell>VERSION
.glibc23.i386.rpmrpm -i MySQL-client-
VERSION
.glibc23.i386.rpm
To install only the client programs, install just the client RPM:
shell> rpm -i MySQL-client-VERSION
.glibc23.i386.rpm
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 , "Verifying Package Integrity Using MD5 Checksums or GnuPG
".
The server RPM places data under the /var/lib/mysql
directory. The RPM also creates a login account for a user named MariaDB
(if one does not exist) to use for running the MariaDB 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 , "Starting and Stopping MariaDB Automatically", for more information on how MariaDB can be started automatically on system startup.
In MariaDB 5.6, during a new installation, the server boot scripts are installed, but the MariaDB server is not started at the end of the installation, since the status of the server during an unattended installation is not known.
In MariaDB 5.6, during an upgrade installation using the RPM packages, if the MariaDB server is running when the upgrade occurs, the MariaDB server is stopped, the upgrade occurs, and the MariaDB server is restarted. If the MariaDB server is not already running when the RPM upgrade occurs, the MariaDB server is not started at the end of the installation.
If something goes wrong, you can find more information in the binary installation section. See , "Installing MariaDB from Generic Binaries on Unix/Linux".Note
The accounts that are listed in the MariaDB grant tables initially have no passwords. After starting the server, you should set up passwords for them using the instructions in , "Postinstallation Setup and Testing".
During RPM installation, a user named MariaDB
and a group named MariaDB
are created on the system. This is done using the useradd, groupadd, and usermod commands. Those commands require appropriate administrative privileges, which is required for locally managed users and groups (as listed in the /etc/passwd
and /etc/group
files) by the RPM installation process being run by root
.
If you log in as the MariaDB
user, you may find that MariaDB displays "Invalid (old?) table or database name" errors that mention .mysqlgui
, lost+found
, .mysqlgui
, .bash_history
, .fonts.cache-1
, .lesshst
, .mysql_history
, .profile
, .viminfo
, and similar files created by MariaDB 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 and group exists and manually transfers ownership following the actions in the RPM spec file.