Find general instructions for installing and upgrading MariaDB Server deployments. This section offers fundamental guidance applicable across various installation methods and environments.
Server Management
Effectively managing your MariaDB Server is key to ensuring its reliability, performance, and security. This section serves as your central hub for all aspects of MariaDB Server management.
Installing Enterprise Server
MariaDB Enterprise Server Upgrade Paths
Provides an overview of supported upgrade paths for MariaDB Enterprise Server, linking to specific guides for upgrading between major versions.
MariaDB Enterprise Server 11.8
Upgrade guide for MariaDB Enterprise Server 11.8, highlighting significant performance improvements in transactional throughput, new vector search optimizations, and enhanced observability features.
Archived Upgrade Guides (Unmaintained/EOL ES Versions)
A collection of upgrade guides for older, end-of-life versions of MariaDB Enterprise Server, kept for reference purposes for legacy systems.
MariaDB Enterprise Server 10.5
A collection of upgrade guides for older, end-of-life versions of MariaDB Enterprise Server, kept for reference purposes for legacy systems.
MariaDB Enterprise Server 10.3
A collection of upgrade guides for older, end-of-life versions of MariaDB Enterprise Server, kept for reference purposes for legacy systems.
Installing Community Server
Learn how to install MariaDB Server on various platforms. This section provides detailed guides and considerations for setting up your database environment, from simple installations to complex deploy
MariaDB Binary Packages
Provides details on using MariaDB binary packages (tarballs, RPMs, DEBs) for installation, including repository configuration scripts.
Installing MariaDB RPM Files
Install and manage MariaDB Server using RPM packages. This section provides detailed instructions for deploying and upgrading MariaDB on RPM-based Linux distributions.
Installation Issues on Debian and Ubuntu
A collection of troubleshooting articles specific to Debian and Ubuntu deployments, covering upgrade failures, repository conflicts, and migration issues.
Deployment
Learn to install and upgrade MariaDB Server. This section provides detailed instructions and best practices for setting up new instances and seamlessly upgrading existing ones to newer versions.
Deployment includes installing, configuring, upgrading, downgrading, migration from other DBMSs, and automated deployment options. Here's an overview of what you can find in this section.
Instructions for manually installing MariaDB on Windows from a ZIP archive, useful for portable installations or advanced configuration needs.
Users need to run , without parameters to create a data directory, e.g
Then you can start server like this
If you like to customize the server instance (data directory, install as service etc), please refer to
This page is licensed: CC BY-SA / Gnu FDL
Installing MariaDB on macOS (PKG)
How to install MariaDB Server on macOS. This is possible using Homebrew.
MariaDB Server does not currently provide a .pkg installer for macOS. For information about how to install MariaDB Server on macOS using Homebrew, see .
This page is licensed: CC BY-SA / Gnu FDL
Installation issues on Windows
Common installation problems on Windows, such as issues with User Account Control (UAC) or unsupported Windows versions, and their solutions.
Unsupported Versions of Windows
Recent versions of MariaDB may not install on unsupported Windows versions. See to find the final supported versions.
Instructions for upgrading to MariaDB Enterprise Server 11.4, which introduces new data types like UUID and INET4, advanced JSON functions, and non-blocking online schema changes.
MariaDB Enterprise Server 10.6
Upgrade documentation for MariaDB Enterprise Server 10.6, featuring Atomic DDL support, JSON_TABLE function, improved Oracle compatibility modes, and the removal of older storage engines.
Troubleshooting Installation Issues
A guide to diagnosing and resolving common installation and connection problems, such as socket errors, permission denied messages, and configuration conflicts.
Compiling MariaDB with Extra Modules/Options
Compile MariaDB Server with extra modules and options. This section details how to customize your build from source, enabling specific features or optimizations for your deployment.
MariaDB Enterprise Server 10.4
A collection of upgrade guides for older, end-of-life versions of MariaDB Enterprise Server, kept for reference purposes for legacy systems.
Compiling MariaDB From Source
Instructions for compiling MariaDB Server from source code using CMake, including obtaining the source and installing dependencies.
Legacy Guides
This section holds building-MariaDB-from-source instructions for building old versions of MariaDB. Recent instructions are in the Compiling MariaDB From Source: The Master Guide page.
Installing System Tables
Explains the necessity of initializing system tables (using mariadb-install-db) after installation and troubleshooting startup issues related to missing tables.
Configuring MariaDB
Learn how to configure MariaDB Server. This section covers essential configuration options, system variables, and best practices for tuning your database for optimal performance and security.
Systems with User Account Control
Running mysql_install_db.exe from a standard command prompt might cause the error:
To get rid of it, use the elevated command prompt, for example on Windows 7 start it via 'Run as administrator' option.
Overview of different deployment architectures (single-node, primary/replica) & methods, including manual installation via repositories or tarballs, and automated deployment with tools like Ansible.
Method
Typical use case
Use in-house infrastructure and tooling to deploy pre-compiled MariaDB binaries from a compressed tar archive
Use Docker and the MariaDB Enterprise Docker Registry to deploy in a container
Use OS package manager to deploy standard OS packages from local mirror of MariaDB's repository
Use OS package manager to deploy standard OS packages from a compressed tar archive without repository configuration
Available deployment methods are component-specific.
Information on creating a free MariaDB ID account to access software downloads, including binary packages and repositories.
A MariaDB ID is a free account that provides:
Customer access to MariaDB database product downloads
Create A MariaDB ID
You can register for a MariaDB ID with a social login or a traditional email/password.
Create a using one of the following Single sign-on methods:
Sign up using your Google Account
Sign up using your GitHub Account
Sign up using your LinkedIn Account
Or use your email address:
Enter your email address and press next.
Click the reset button. A password link will appear in your email.
Once you set a new password, the MariaDB account page will appear.
Obtaining Support
MariaDB Corporation provides commercial support and services for MariaDB database products.
To contact us with questions, or if you need assistance:
If you are able to login to your MariaDB ID,
If you do not have a MariaDB ID or are unable to login,
\
Checking MariaDB RPM Package Signatures
Instructions on how to verify the integrity of MariaDB RPM packages using GPG signatures, including importing the public key and running `rpm --checksig`.
MariaDB RPM packages since are signed.
The key we use has an id of 1BB943DB and the key fingerprint is:
1993 69E5 404B D5FC 7D2F E43B CBCB 082A 1BB9 43DB
To check the signature you first need to import the public part of the key like so:
Next you need to let pgp know about the key like so:
You can check to see if the key was imported with:
Once the key is imported, you can check the signature of the MariaDB RPM files by running the something like the following in your download directory:
The output of the above will look something like this (make sure gpg shows up on each OK line):
See Also
This page is licensed: CC BY-SA / Gnu FDL
MariaDB for DirectAdmin Using RPMs
Specific instructions for installing MariaDB RPMs on servers running the DirectAdmin control panel, including necessary configuration edits to prevent conflicts.
If you are using DirectAdmin and you encounter any issues with Installing MariaDB with YUM, then the directions below may help. The process is very straightforward.
Installing with YUM is preferable to installing the MariaDB RPM packages manually, so only do this if you are having issues such as:
Starting httpd:
Or:
RPM Installation
To install the RPMs, there is a quick and easy guide to . Follow the instructions there.
Necessary Edits
We do not want DirectAdmin's custombuild to remove/overwrite our MariaDB
installation whenever an update is performed. To rectify this, disable automatic MySQL installation.
Edit /usr/local/directadmin/custombuild/options.conf and replace mysql_inst=yes with mysql_inst=no
When MariaDB is installed manually (i.e. not using YUM), updates are not
automatic. You will need to update the RPMs yourself.
This page is licensed: CC BY-SA / Gnu FDL
Troubleshooting MariaDB Installs on RHEL / CentOS
Solutions for common installation issues on RHEL and CentOS, such as conflicts with existing MySQL installations and handling configuration file backups (.rpmsave).
The following article is about different issues people have encountered when installing MariaDB on RHEL / CentOS.
In RHEL/ CentOS it is also possible to install a RPM or a tar ball. The RPM is the preferred version, except if you want to install many versions of MariaDB or install MariaDB in a non standard location.
Replacing MySQL
If you removed an MySQL RPM to install MariaDB, note that the MySQL RPM on uninstall renames /etc/my.cnf to /etc/my.cnf.rpmsave.
After installing MariaDB you should do the following to restore your configuration options:
Unsupported configuration options
If you are using any of the following options in your /etc/my.cnf or other my.cnf file you should remove them. This is also true for MySQL 5.1 or newer:
See also
This page is licensed: CC BY-SA / Gnu FDL
Why Source RPMs (SRPMs) Aren't Packaged For Some Platforms
Explains the limitations in providing Source RPMs (SRPMs) for certain platforms due to CMake version requirements and build system dependencies.
MariaDB source RPMs (SRPMs) are not packaged on all platforms for which MariaDB RPMs are packaged.
The reason is that MariaDB's build process relies heavily on cmake for a lot of things. In this specific case, MariaDB's build process relies on CMake CPack Package Generators to build RPMs. The specific package generator that it uses to build RPMs is called CPackRPM.
Support for source RPMs in CPackRPM became usable with MariaDB's build system starting from around cmake 3.10. This means that we do not produce source RPMs on platforms where the installed cmake version is older than that.
Instructions for running the `mariadb-install-db` script on Unix-like systems to initialize the MariaDB data directory and system tables.
mariadb-install-db initializes the MariaDB data directory and creates the system tables in the mysql database, if they do not exist. MariaDB uses these tables to manage privileges, roles, and plugins. It also uses them to provide the data for the help command in the mariadb client.
To invoke mariadb-install-db, use the following syntax:
For the options supported by , see .
For the option groups read by , see .
See for information on the installation process.
See for information on how to troubleshoot the installation process.
See Also
The Windows version of mariadb-install-db:
This page is licensed: CC BY-SA / Gnu FDL
Error: symbol mysql_get_server_name, version libmysqlclient_16 not defined
Troubleshooting guide for a specific linker error involving `mysql_get_server_name` and `libmysqlclient_16`, typically occurring due to library version mismatches.
If you see the error message:
symbol mysql_get_server_name, version libmysqlclient_16 not defined in file libmysqlclient.so.16 with link time reference
...then you are probably trying to use the mysql command-line client from MariaDB with libmysqlclient.so from MySQL.
The symbol mysql_get_server_name() is something present in the MariaDB source tree and not in the MySQL tree.
If you have both the MariaDB client package and the MySQL client packages installed this error will happen if your system finds the MySQL version oflibmysqlclient.so first.
To figure out which library is being linked in dynamically (for instance, the wrong one) use the 'ldd' tool.
or
For example:
You can then use your package manager's tools to find out which package the library belongs to.
On CentOS the command to find out which package installed a specific file is:
On Debian-based systems, the command is:
Here's an example of locating the library and finding out which package it belongs to on an Ubuntu system:
The above shows that the mysql command-line client is using the library /usr/lib/libmysqlclient.so.16 and that library is part of the libmariadbclient16 Ubuntu package. Unsurprisingly, the mysql command-line client works perfectly on this system.
If the answer that came back had been something other than a MariaDB package, then it is likely there would have been issues with running the MariaDB mysql client application.
If the library that the system tries to use is not from a MariaDB package, the remedy is to remove the offending package (and possibly install or re-install the correct package) so that the correct library can be used.
This page is licensed: CC BY-SA / Gnu FDL
Installation Issues with PHP5
Addresses compatibility issues between MariaDB and older PHP5 client libraries, specifically regarding header and library version mismatches.
PHP5 may give an error if used with the old connect method:
'mysql_connect(): Headers and client library minor version mismatch. Headers:50156 Library:50206'
This is because the library wrongly checks and expects that the client library must be the exact same version as PHP was compiled with. You would get the same error if you tried to upgrade just the MySQL client library without upgrading PHP at the same time.
Ways to fix this issue:
Switch to using the mysqlnd driver in PHP (Recommended solution).
Run with a lower :
Recompile PHP with the MariaDB client libraries.
Use your original MySQL client library with the MariaDB.
This page is licensed: CC BY-SA / Gnu FDL
Installing on an Old Linux Version
Guidance for dealing with glibc or shared library errors when attempting to install modern MariaDB binaries on older Linux distributions.
This article lists some typical errors that may happen when you try to use an incompatible MariaDB binary on a linux system:
The following example errors are from trying to install MariaDB built for SuSE 11.x on a SuSE 9.0 server:
> scripts/mysql_install_db
./bin/my_print_defaults: /lib/i686/libc.so.6:
version `GLIBC_2.4' not found (required by ./bin/my_print_defaults)
and
> ./bin/mysqld --skip-grant &
./bin/mysqld: error while loading shared libraries: libwrap.so.0:
cannot open shared object file: No such file or directory
If you see either of the above errors, the binary MariaDB package you installed is not compatible with your system.
The options you have are:
Find another MariaDB package or tar from the that matches your system.
Alternatively, and .
This page is licensed: CC BY-SA / Gnu FDL
apt-upgrade Fails, But the Database is Running
Solutions for when `apt-get upgrade` hangs or fails because the MariaDB service takes too long to start, triggering a timeout in the init script.
After running apt-upgrade mariadb, it's possible that apt shows a fail in trying to start the server, but in fact the database is up and running, which then provokes apt to remain in a non finished state.
For example:
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Setting up mariadb-server-10.1 (10.1.10+maria-1~trusty) ...
* Stopping MariaDB database server mysqld
...done.
* Starting MariaDB database server mysqld
...fail!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mariadb-server-10.1 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mariadb-server:
mariadb-server depends on mariadb-server-10.1 (= 10.1.10+maria-1~trusty); however:
Package mariadb-server-10.1 is not configured yet.
dpkg: error processing package mariadb-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mariadb-server-10.1
mariadb-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
This situation could occur if the timeout for the init script was too short. For example, see MDEV-9382, a situation where the timeout was 30 seconds, but the server was taking 48 seconds to start.
To overcome this, the timeout needs to be increased. This can be achieved as follows:
On systems where systemd is not enabled/supported: The timeout can be increased by setting MYSQLD_STARTUP_TIMEOUT either directly in the script or via the command line. The init script also sources /etc/default/mariadb, so it can also be used to set MYSQLD_STARTUP_TIMEOUT to persistently change the startup timeout.
On systems that support systemd: The startup timeout can be increased by setting option.
This page is licensed: CC BY-SA / Gnu FDL
Building MariaDB on Gentoo
Instructions for building MariaDB on Gentoo Linux using the `emerge` command.
MariaDB is in Gentoo, so the steps to build it are:
Synchronize your tree with\
emerge --sync
Build MariaDB using\
emerge mariadb
This page is licensed: CC BY-SA / Gnu FDL
Creating the MariaDB Source Tarball
Explains how to generate a source tarball from the MariaDB build environment using `automake` and `make dist`.
Then use automake/configure/make to generate the tar file:
BUILD/autorun.sh
./configure --with-plugin-xtradb
make dist
This creates a source file with a name like mysql-5.3.2-MariaDB-beta.tar.gz
See also the generic build instructions.
This page is licensed: CC BY-SA / Gnu FDL
Cross-compiling MariaDB
Instructions for cross-compiling MariaDB for different architectures, including using Buildroot and CMake toolchain files.
Buildroot
is a way to cross compile MariaDB and other packages into a root filesystem. In the menuconfig you need to enable "Enable C++ Support" first under "Toolchain". After C++ is enabled MariaDB is an option under "Target Packages" ->"Libraries" -> "Databases" -> "mysql support" -> "mysql variant" -> "mariadb". Also enable the "mariadb server" below the "mysql support" option.
Creating a Debian Repository
Instructions on how to create a custom Debian repository for MariaDB packages using `dpkg-scanpackages`.
Below are instructions for creating your own Debian repository. The instructions are based on
Using the Debian repository you just created
One needs to add a new file to the /etc/apt/sources.list.d/ directory. For instance a new file called mariadb.list
Building MariaDB From Source Using musl-based GNU/Linux
Guide for compiling MariaDB on Alpine Linux or other musl-based systems, noting limitations like TokuDB support.
Instructions on compiling MariaDB on musl-based operating systems (Alpine)
The instructions on this page will help you compile from source.
Links to more complete instructions for specific platforms can be found on the page.
Building MariaDB on Solaris and OpenSolaris
Notes and configuration tips for building MariaDB on Solaris and OpenSolaris platforms, including buildbot setup.
The following two articles should help you get your Solaris machine prepared to build MariaDB (just ignore the parts about installing buildbot):
httpd:
Syntax error on line 18 of /etc/httpd/conf/httpd.conf:
Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf:
Cannot load /usr/lib/apache/libphp5.so into server:
libmysqlclient.so.18: cannot open shared object file: No such file or directory
Starting httpd:
httpd:
Syntax error on line 18 of /etc/httpd/conf/httpd.conf:
Syntax error on line 1 of /etc/httpd/conf/extra/httpd-phpmodules.conf:
Cannot load /usr/lib/apache/libphp5.so into server:
/usr/lib/apache/libphp5.so: undefined symbol: client_errors
To cross-compile with cmake you will need a toolchain file. See, for example, here. Besides cmake specific variables it should have, at least
with appropriate values for your target architecture. Normally these MariaDB configuration settings are detected by running a small test program, and it cannot be done when cross-compiling.
Note that during the build few helper tools are compiled and then immediately used to generate more source files for this very build. When cross-compiling these tools naturally should be built for the host architecture, not for the target architecture. Do it like this (assuming you're in the mariadb source tree):
Now the helpers are built and you can cross-compile:
Here you invoke cmake, specifying the path to your toolchain file and the path to the import_executables.cmake that you have just built on the previous step. Of course, you can also specify any other cmake parameters that could be necessary for this build, for example, enable or disable specific storage engines.
apt-get install will spray output of scripts and servers all over /var/log. It is also possible to set DEBIAN_SCRIPT_DEBUG=1 to get some (not all) of it to stdout.
Cleaning up after failed installation
Run
to see what is installed, and then
until the former produces empty output. Note: after some failures, /etc/mysql and /var/lib/mysql are not cleaned and still need to be removed manually.
The BUILD dir contains various scripts for compiling MariaDB on Solaris. The BUILD/compile-solaris-amd64 and BUILD/compile-solaris-amd64-debug are probably the most useful.
The scripts do not play nice with non-bash shells such as the Korn Shell (ksh). So if your /bin/sh is pointing at ksh or ksh93, you'll want to change it so that it points at bash.
Explains the benefits and use cases for deploying MariaDB using package tarballs (containing RPMs or DEBs) for offline or custom installations.
MariaDB Corporation provides package tarballs for some MariaDB database products.
Package tarballs provide multiple benefits:
Package tarballs are compressed tar archives that contain software packages.
Software packages can be installed using the operating system's package manager without relying on a remote repository.
RPM (.rpm) files are distributed for CentOS, Red Hat Enterprise Linux (RHEL), and SUSE Linux Enterprise Server (SLES).
DEB (.deb) files are distributed for Debian and Ubuntu.
If you want to deploy MariaDB database products without using a package tarball, are available. Available deployment methods are component-specific.
Use Cases
MariaDB database products can be deployed with package tarballs to support use cases, such as:
Transfer the package tarball to an air-gapped network for installation without an internet connection
Install software using a package manager without configuring a package repository
Automatically install missing dependencies using a package manager
Compatibility
The following MariaDB database products can be deployed using package tarballs:
MariaDB Community Server 10.5
MariaDB Community Server 10.6
MariaDB Enterprise Server 10.5
MariaDB Enterprise Server 10.6
Download a Package Tarball
MariaDB Corporation provides package tarballs (.debs.tar, .rpms.tar) to support customers who leverage in-house package repositories to distribute software to their servers. Secure any such repository to prevent outside access.
MariaDB Corporation provides multiple interfaces to download package tarballs.
Visit the MariaDB Downloads page.
Complete customer login.
Select the desired version and operating system.
Installation From Package Tarball
Once downloaded and extracted, you can:
Install .rpm packages (RHEL, CentOS, and SLES): rpm -i
Install .deb packages (Debian, Ubuntu): dpkg -i
Install from the simple package repositories included in the tarball. Missing dependencies will be resolved when using the apt
Installation loads software to the system. This software requires configuration before the database server is ready for use.
Explains how to use CMake options like `PLUGIN_xxx` to control which plugins are built statically, dynamically, or not at all during compilation.
By default all plugins are enabled and built as dynamic .so (or .dll) modules. If a plugin does not support dynamic builds, it is not built at all.
Use PLUGIN_xxx cmake variables. They can be set on the command line with -DPLUGIN_xxx=value or in the cmake gui. Supported values are
Value
Effect
Note that unlike autotools, cmake tries to configure and build incrementally. You can modify one configuration option and cmake will only rebuild the part of the tree affected by it. For example, when you do cmake -DWITH_EMBEDDED_SERVER=1 in the already-built tree, it will make libmysqld to be built, but no other configuration options will be changed or reset to their default values.
In particular this means that if you have run, for examplecmake -DPLUGIN_OQGRAPH=NO
and later you want to restore the default behavior (with OQGraph being built) in the same build tree, you would need to runcmake -DPLUGIN_OQGRAPH=DYNAMIC
Alternatively, you might simply delete the CMakeCache.txt file — this is the file where cmake stores current build configuration — and rebuild everything from scratch.
This page is licensed: CC BY-SA / Gnu FDL
Building MariaDB on Ubuntu
Step-by-step guide for compiling MariaDB on Ubuntu, covering build dependencies installation and using source repositories.
In the event that you are using the Linux-based operating system Ubuntu or any of its derivatives and would like to compile MariaDB from source code, you can do so using the MariaDB source repository for the release that interests you.
Before you begin, install the software-properties-common, devscripts and equivs packages.
Installing Build Dependencies
MariaDB requires a number of packages to compile from source. Fortunately, you can use the MariaDB repositories to retrieve the necessary code for the version you want. Use the tool to determine how to set up the MariaDB repository for your release of Ubuntu, the version of MariaDB that you want to install, and the mirror that you want to use.
First add the authentication key for the repository, then add the repository.
Once the repository is set up, you can use apt-get to retrieve the build dependencies. MariaDB packages supplied by Ubuntu and packages supplied by the MariaDB repository have the same base name of mariadb-server. You need to specify the specific version you want to retrieve.
Building MariaDB
Once you have the base dependencies installed, you can retrieve the source code and start building MariaDB. The source code is available on GitHub. Use the --branch option to specify the particular version of MariaDB you want to build.
The source code includes scripts to install the remaining build dependencies. For Ubuntu, they're located in the debian/ directory. Navigate into the repository and run the autobake-deb.sh script. Then use
Further Dependencies
In the event that there are still build dependencies that are not satisfied, use mk-build-deps to generate a build dependency deb to use in installing the remaining packages.
Then, call the autobake-deb.sh script again to build MariaDB.
After Building
After building the packages, it is a good idea to put them in a repository. See the page for instructions.
This page is licensed: CC BY-SA / Gnu FDL
Best Practices
A guide outlining essential recommendations for stable MariaDB deployments, covering backup strategies, change management, security controls, and pre-production testing.
These best practices warrant consideration, but are not expected to apply to every business or in every situation. Recommendations here are not mandatory.
General Recommendations
We recommend that you:
Deploy with Local Package Repository Mirrors
Learn how to create and maintain local mirrors of MariaDB package repositories for secure or air-gapped deployments.
MariaDB Corporation provides package repositories, including the MariaDB Enterprise Repository and the MariaDB Community Repository, that can be used to install MariaDB products using the operating system's package manager. Local mirrors of the package repositories can be used for local deployments.
Local package repository mirrors provide multiple benefits:
MariaDB Corporation's official package repositories are the source for the local mirror.
Installing MariaDB With the rpm Tool
A guide to installing MariaDB using the low-level `rpm` command, suitable for situations where package managers like `yum` or `dnf` are not available or preferred.
This article describes how to download the RPM files and install them using therpm command.
It is highly recommended to where possible.
Navigate toand choose
the desired database version and then select the RPMs that match your Linux distribution and architecture.
Clicking those links takes you to a local mirror. Choose the rpms
link and download the desired packages. The packages will be similar to the following:
For a standard server installation you will need to download at least
the client, shared, and server RPM files. See for more information about what is included in each RPM package.
MariaDB Installation via RPMs on CentOS 7
A detailed walkthrough for installing a specific legacy version of MariaDB (10.1.21) on CentOS 7 using individual RPM packages, including dependency resolution.
This guide provides the detailed steps for installing MariaDB 10.1.21 via individual RPM packages on CentOS 7. The process involves installing dependencies, then the main packages, and resolving potential conflicts as they appear.
The RPMs needed for the installation are available from the MariaDB website. The required packages for this guide are:
Step-by-Step Installation
1. Install Basic Dependencies
Installing System Tables on Windows
Details the use of `mariadb-install-db.exe` on Windows to create new database instances, set the root password, and register Windows services.
The mariadb-install-db.exe utility is the Windows equivalent of .
Functionality
The functionality of mariadb-install-db.exe is comparable with the shell script mariadb-install-db
Building MariaDB on Debian
Step-by-step guide for compiling MariaDB on Debian, including installing build dependencies via `apt-get` and using `autobake-deb.sh`.
In the event that you are using the Linux-based operating system Debian or any of its direct derivatives and would like to compile MariaDB from source code, you can do so using the MariaDB source repository for the release that interests you. For Ubuntu and its derivatives, see .
Before you begin, install the software-properties-common and devscripts packages:
Compiling MariaDB with Vanilla XtraDB
A guide for compiling older versions of MariaDB (specifically 5.3) with the original XtraDB engine from Percona Server, useful for testing purposes.
Sometimes, one needs to have MariaDB compiled with Vanilla XtraDB. This page describes the process to do this. The process is rather crude, as my goal was just a once-off compile for testing (that is, not packaging or shipping) purposes.
The process is applicable to and XtraDB from Percona Server 5.1.61.
This page is licensed: CC BY-SA / Gnu FDL
Building RPM Packages From Source
Explains how to generate RPM packages from the MariaDB source code using CMake with the `-DRPM` flag.
To generate RPM packages from the build, supply the -DRPM=xxx flag to CMake, where the value xxx is the name of the distribution you're building for. For example, centos7 or rocky8 or fedora39 or sles15.
What these do are controlled in the following CMake files:
cmake/cpack_rpm.cmake
Creating the MariaDB Binary Tarball
How to generate a binary tarball from compiled source using `make package`, enabling portable distribution.
How to generate binary tar.gz files.
.
with your preferred options/plugins.
If the binaries are already built, you can generate a binary tarball with
Building MariaDB on Fedora
Instructions for building MariaDB on Fedora, using `dnf builddep` to install dependencies and CMake to configure the build.
In the event that you are using the Linux-based operating system Fedora or any of its derivatives and would like to compile MariaDB from source code, you can do so using the MariaDB build in the official repositories.
Installing Build Dependencies
MariaDB requires a number of packages to compile from source. Fortunately, you can use the package in the Fedora repository to retrieve most of the relevant build dependencies through DNF.
Running DNF in this way pulls the build dependencies for the release of MariaDB compiled by your version of Fedora. These may not be all the dependencies you need to build the particular version of MariaDB you want to use, but it will retrieve most of them.
After downloading the MariaDB RPM files, you might want to check their signatures. See Checking MariaDB RPM Package Signatures for more information about checking signatures.
Prior to installing MariaDB, be aware that it will conflict with an existing
installation of MySQL. To check whether MySQL is already installed, issue the
command:
If necessary, you can remove found MySQL packages before installing MariaDB.
To install MariaDB, use the command:
You should see output such as the following:
Be sure to follow the instructions given in the preceding output and create a
password for the root user either by using mariadb-admin or by running the
/usr/bin/mysql_secure_installation script.
Installing the MariaDB RPM files installs the MySQL tools in the /usr/bin
directory. You can confirm that MariaDB has been installed by using the mariadb
client program. Issuing the command mariadb should give you the MariaDB
cursor.
First, use yum to install some general system packages that may be required.
2. Install MariaDB RPM Packages
Next, install the downloaded RPMs in sequence. Make sure to run these commands as a user with sufficient privileges (e.g., using sudo).
During this process, you may encounter errors related to dependencies or conflicts. The sections below describe these common issues and their solutions.
Troubleshooting Common Installation Errors and Warnings
Error 1: Package Conflict with mariadb-libs
While installing mariadb-common, you may encounter a conflict with an existing package.
You must find and remove the conflicting mariadb-libs package.
After removing it, you can run the rpm -ivh MariaDB-10.1.21-centos7-x86_64-common.rpm command again.
Error 2: Failed Dependency for Galera
While installing the Galera package, the installation may fail due to a missing library.
The required dependency libboost_program_options can be installed using yum.
After installing boost-devel, you can run the rpm -ivh galera... command again.
Warning: GPG Key NOKEY
You may also see a warning about a missing GPG key during the installation.
This warning can be resolved by importing the official MariaDB GPG key.
Post-Installation
After all RPMs are successfully installed, the final step is to secure the server. This involves setting the root password, removing test databases, and disallowing remote root login.
This page is licensed: CC BY-SA / Gnu FDL
Installing Build Dependencies
MariaDB requires a number of packages to compile from source. Fortunately, you can use the MariaDB repositories to retrieve the necessary code for the version you want. Use the Repository Configuration tool to determine how to set up the MariaDB repository for your release of Debian, the version of MariaDB that you want to install, and the mirror that you want to use.
First add the authentication key for the repository, then add the repository.
The second command added text to the /etc/apt/sources.list file. One of these lines is the repository containing binary packages for MariaDB, the other contains the source packages. The line for the source packages is commented out by default. This can be scripted:
Alternately, open the file using your preferred text editor and uncomment the source repository.
Once the repository is set up, you can use apt-get to retrieve the build dependencies. MariaDB packages supplied by Ubuntu and packages supplied by the MariaDB repository have the same base name of mariadb-server. You need to specify the specific version you want to retrieve.
Building MariaDB
Once you have the base dependencies installed, you can retrieve the source code and start building MariaDB. The source code is available on GitHub. Use the --branch option to specify the particular version of MariaDB you want to build.
The source code includes scripts to install the remaining build dependencies. For Ubuntu, they're located in the debian/ directory. Navigate into the repository and run the autobake-deb.sh script. Then use
After Building
After building the packages, it is a good idea to put them in a repository. See the Creating a Debian Repository page for instructions.
You'll also need to install Git to retrieve the source repository:
Building MariaDB
Once you have the base dependencies installed, you can retrieve the source code and start building MariaDB. The source code is available on GitHub. Use the --branch option to specify the particular version of MariaDB you want to build.
With the source repository cloned onto your system, you can start building MariaDB. Change into the new mariadb-server/ directory and run CMake to prepare the build.
Once CMake readies the relevant Makefile for your system, use Make to build MariaDB.
Preparing... ########################################### [100%]
1:MariaDB-shared ########################################### [ 14%]
2:MariaDB-client ########################################### [ 29%]
3:MariaDB-client ########################################### [ 43%]
4:MariaDB-debuginfo ########################################### [ 57%]
5:MariaDB-devel ########################################### [ 71%]
6:MariaDB-server ########################################### [ 86%]
PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER !
To do so, start the server, then issue the following commands:
/usr/bin/mariadb-admin -u root password 'new-password'
/usr/bin/mariadb-admin -u root -h hostname password 'new-password'
Alternatively you can run:
/usr/bin/mysql_secure_installation
which will also give you the option of removing the test
databases and anonymous user created by default. This is
strongly recommended for production servers.
See the MySQL manual for more instructions.
Please report any problems with the /usr/bin/mysqlbug script!
The latest information about MariaDB is available at http://www.askmonty.org/.
You can find additional information about the MySQL part at:
http://dev.mysql.com
Support MariaDB development by buying support/new features from
Monty Program Ab. You can contact us about this at sales@askmonty.org.
Alternatively consider joining our community based development effort:
http://askmonty.org/wiki/index.php/MariaDB#How_can_I_participate_in_the_development_of_MariaDB
Starting MySQL....[ OK ]
Giving mysqld 2 seconds to start
7:MariaDB-test ########################################### [100%]
# Search for the installed package
rpm -qa | grep mariadb-libs
# Expected output: mariadb-libs-5.5.52-1.el7.x86_64
# Remove the conflicting package (use the exact name from the command above)
rpm -ev --nodeps mariadb-libs-5.5.52-1.el7.x86_64
# rpm -ivh galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm
error: Failed dependencies:
libboost_program_options.so.1.53.0()(64bit) is needed by galera-25.3.19-1.rhel7.el7.centos.x86_64
yum install boost-devel.x86_64
warning: galera-25.3.19-1.rhel7.el7.centos.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY
# First, start the newly installed MariaDB service
systemctl start mariadb
# Now, run the security script and follow the prompts
mysql_secure_installation
sed -e '/^# deb-src.*mariadb/s/^# //' -i /etc/apt/sources.list
$ sudo vim /etc/apt/sources.list
...
deb [arch=amd64] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.3/debian stretch main
deb-src [arch=amd64] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.3/debian stretch main
$ mkdir mariadb-build
$ cd mariadb-build
$ cmake -DRPM=fedora ../mariadb-server
$ make package
Understand business requirements before deployment.
Adapt deployment practices to align to business requirements.
Consider to what extent deployed systems should integrate with existing business systems and practices.
Backups
Addition, removal, and change of database systems are types of production changes. Before undertaking any production changes:
Perform a backup of existing data and database configurations.
Establish a plan for data restoration for use in reverting a change.
Perform a test to confirm your backup is complete and viable.
Irreversible Changes
Installation of new database servers, change of server configuration, migrations, upgrades, and downgrades can produce irreversible changes which may require you to restore from the last good backup.
Changes to data format on disk, including from upgrades and downgrades, are generally irreversible. A fault during the upgrade or downgrade process may corrupt data. Confirm you have a recent, full, complete, and tested backup before any upgrade or downgrade operation.
When System-Versioned temporal data tables are in use, downgrade operations will generally require migration of data between servers or restore from a backup made pre-upgrade.
Full and Complete Backup
Before proceeding with an upgrade, perform a full and complete backup. Confirm successful completion of the backup operation and test the backup.
Business requirements may require you to retain backups made to support upgrade and downgrade operations.
Additional information regarding backing up and restoring MariaDB database products can be found in "Recovery".
Change Management
Change Management, Automation, Orchestration
Server configuration changes should be done through change management. Accurate records of the time of change and reason for change can enable faster issue diagnosis.
Automation can enable repeatability of change deployment, and can aid Pre-Production and Post-Production testing.
Automation or orchestration can enable repeatability of server deployment, including system provisioning.
Production Controls
Dedicated Servers
Database servers exist to run database server software. Database servers should not also run web server software, act as a file server, or run other workloads.
Understand workload and data isolation requirements before server deployment. Isolation requirements are often defined through business requirements, including:
Data and application security requirements that trigger isolation of one workload from other workloads.
Separation of Development and Testing environments from Production environments.
Production Controls
Understand control requirements before server deployment, including records of control implementation needed to support audits.
Control requirements typically follow data:
Both production and non-production systems may require production-level controls based on the presence of data subject to control.
Database servers, backup servers, and other systems may require production-level controls based on the presence of data subject to control.
Testing
Servers should be validated before exposure to production workloads and production data.
It may be appropriate to prevent access to an unconfigured server until configured and validated. Load balancer configuration, firewall rules, or database server configuration are often used to prevent unintended traffic to new servers.
Details assessed during Pre-Production validation can include:
Server capacity, including performance of disk systems
Server security configuration and hardening
Tuning for initial data load vs production workloads
Alignment to business requirements
Updates
MariaDB Product Notifications allow you to keep aware of new releases, including security fixes. Customers can manage MariaDB Product Notifications through the MariaDB Customer Portal.
Additionally, MariaDB Enterprise Server follows an enterprise lifecycle, that provides a .
Obtaining Support
MariaDB Corporation provides commercial support and services for MariaDB database products.
Tools provided by the operating system are used to create and maintain the local mirror.
After a local mirror is created, the mirror can be used just like the MariaDB repositories to install MariaDB products using the operating system's package manager.
If you want to deploy MariaDB database products without using a local package repository mirror, alternative deployment methods are available. Available deployment methods are component-specific.
Use Cases
MariaDB database products can be deployed with local package repository mirrors to support use cases, such as:
Install from the mirror on an air-gapped network that is not connected to the internet
Remove packages from mirror for versions that are not used in the local environment
Add packages to mirror for tools and clients that are used in the local environment
Automatically install missing dependencies using a package manager
Compatibility
The following MariaDB database products can be deployed using package repositories:
MariaDB Community Server 10.6
MariaDB Community Server 10.11
MariaDB Community Server 11.4
MariaDB Community Server 11.8
MariaDB Community Server 12.3
MariaDB Enterprise Server 10.6
MariaDB Enterprise Server 11.4
MariaDB Enterprise Server 11.8
MariaDB MaxScale 23.02
MariaDB MaxScale 23.08
MariaDB MaxScale 24.02
MariaDB MaxScale 25.01
Operating System Package Managers
The package manager depends on the operating system:
Operating System
Package Manager
Debian 11
APT
Debian 12
APT
Debian 13
APT
Red Hat Enterprise Linux 8 (RHEL 8)
DNF
Red Hat Enterprise Linux 9 (RHEL 9)
DNF
Red Hat Enterprise Linux 10 (RHEL 10)
DNF
Create a Local Repository Mirror
Creating a local mirror of the MariaDB Enterprise Repository or the MariaDB Community Repository enables you to distribute MariaDB products to your servers from a local repository you support. Secure any such repository mirror to prevent outside access.
used on Unix, however it has been extended with both Windows specific functionality (creating a Windows service) and to generally useful functionality. For example, it can set the 'root' user password during database creation. It also creates the
my.ini
configuration file in the data directory and adds most important parameters to it (e.g port).
mariadb-install-db.exe is used by the MariaDB installer for Windows if the "Database instance" feature is selected. It obsoletes similar utilities and scripts that were used in the past such as mysqld.exe--install,mysql_install_db.pl, and mysql_secure_installation.pl.
Parameter(s)
Description
-?, --help
Display help message and exit
-d, --datadir=name
Data directory of the new database
-S, --service=name
Name of the Windows service
-p, --password=name
Password of the root user
-P, --port=#
mysqld port
-W, --socket=name
named pipe name
To create a Windows service, mariadb-install-db.exe should be run
by a user with full administrator privileges (which means elevated command
prompt on systems with UAC).
Example
will create the database in the directory C:\db, register the auto-start
Windows service "MyDB", and set the root password to 'secret'.
To start the service from the command line, execute
Removing Database Instances
If you run your database instance as service, to remove it completely from the
command line, use
wget http://s.petrunia.net/scratch/make-vanilla-xtradb-work-with-mariadb.diff
bzr branch /path/to/mariadb-5.3 5.3-vanilla-xtradb-r3
cd 5.3-vanilla-xtradb-r3/storage/
tar czf innodb_plugin.tgz innodb_plugin/
rm -rf innodb_plugin
tar czf xtradb.tgz xtradb/
rm -rf xtradb
cd ../../
tar zxvf ~/Percona-Server-5.1.61.tar.gz
cp -r Percona-Server-5.1.61/storage/innodb_plugin 5.3-vanilla-xtradb-r3/storage/
patch -p1 -d 5.3-vanilla-xtradb-r3/storage/innodb_plugin/ < make-vanilla-xtradb-work-with-mariadb.diff
cd 5.3-vanilla-xtradb-r3/
BUILD/autorun.sh
./configure --with-plugin-innodb_plugin
make
Customer Download Token
Instructions on how to retrieve and use a Customer Download Token to access MariaDB Enterprise Server packages and binaries.
MariaDB Corporation customers can use a Customer Download Token to download MariaDB database products using command-line tools or automation. This page provides instructions on how to retrieve and use the Customer Download Token.
Alternatively, customers can download MariaDB database products using a web browser from the MariaDB Enterprise Download page without a Customer Download Token if they are logged in with their MariaDB ID.
Retrieve Customer Download Token
MariaDB Corporation customers can retrieve their Customer Download Token through the MariaDB Customer Portal.
MariaDB Corporation's Customer Download Tokens are customer-specific. Protect the token as you would any security credential.
To retrieve the Customer Download Token for your account:
Navigate to the .
Log in using your .
Copy the Customer Download Token.
Use the Customer Download Token
MariaDB Corporation customers can use their Customer Download Token for multiple operations.
Choose the procedure for your desired operation and substitute your Customer Download Token for CUSTOMER_DOWNLOAD_TOKEN:
Operation
Use Case
Configure MariaDB Enterprise Repository
MariaDB Corporation provides the MariaDB Enterprise Repository to install MariaDB database products using package managers on CentOS / RHEL (YUM), Debian / Ubuntu (APT), and SLES (ZYpp).
The MariaDB Enterprise Repository is configured using the mariadb_es_repo_setup script, which requires the Customer Download Token to be provided via the --token option.
For additional information, see "".
Download Binary Files
MariaDB Corporation provides an interface to download binary files using command-line tools or automation.
Binary files can be downloaded using command-line tools or automation from the MariaDB Download interface with the Customer Download Token. The URL is in the following format:
Download a binary file using the following procedure:
In your web browser, visit the MariaDB Download interface for the specific MariaDB database product:
MariaDB Enterprise Server
MariaDB MaxScale
or using curl:
Log in to MariaDB Enterprise Docker Registry
Docker is an open platform for developing, shipping, and running applications that allows you to separate your applications from your infrastructure. MariaDB Corporation provides the .
The MariaDB Enterprise Docker Registry provides Docker images for MariaDB Enterprise Server. The Docker images for MariaDB Enterprise Server are currently beta maturity, so they are not currently recommended for production.
Compatibility and Breaking Changes for MariaDB Enterprise Server 10.5
Guide Overview
This page acts as a technical reference, highlighting the logical impacts, architectural changes, and potential breaking points when upgrading to MariaDB Enterprise Server 10.5. It focuses on technical issues identified through customer support and engineering audits. This guide aims to supplement the comprehensive feature summaries available in the page for MariaDB Enterprise Server 10.5.
For a full rundown of new features and overall improvements, users should consult the What's New guide. Note that for better clarity and accessibility, the technical specifics here may be integrated into the What's New guide in future documentation updates.
Architectural Changes
Binary and Process Renaming
MariaDB Enterprise Server 10.5 completes the transition to MariaDB-prefixed names for all executables.
Process Identification: While symbolic links (e.g., mysqld) are provided for backward compatibility, the primary server binary is now mariadbd.
Monitoring Alert: When started via systemd or mariadbd-safe, the process will identify as mariadbd in the system process list.
Security and Privileges
Granularity (The "SUPER" Split)
In 10.5, the SUPER privilege has been deconstructed into several smaller, granular privileges to improve security.
Configuration and Include Paths
Debian and Ubuntu Path Logic
Beginning with 10.5, the configuration loading logic on Debian and Ubuntu has shifted:
Directory Priority: The directory /etc/mysql/mariadb.conf.d/ now uses numeric prefixes to dictate loading order.
Enterprise Overrides: The mariadb-enterprise.cnf file is typically loaded last, potentially overriding user-defined settings in 50-server.cnf.
Pre-Upgrade Requirements
Mandatory Clean Shutdown
Upgrading from 10.4 to 10.5 after a crash is not supported if the redo log was created in 10.4.
Requirement: You must perform a clean shutdown (setting SET GLOBAL innodb_fast_shutdown = 0 is recommended) before initiating the upgrade.
Redo Log Adjustment: If innodb-log-files-in-group is set to 2, it must be changed to 1 on the 10.4 instance, followed by a restart and a final clean shutdown before moving to 10.5.
Critical Parameter Shifts
GPG
Information about the GPG keys used to sign MariaDB packages and repositories, including how to import them for verification.
The MariaDB project signs their MariaDB packages for Debian, Ubuntu, Fedora, and Red Hat. This page documents information about the keys that we use and have used.
MariaDB Community Server Debian / Ubuntu key
Our MariaDB Community Server repositories for Debian "Sid" and the Ubuntu 16.04 and beyond "Xenial" use the following GPG signing key. As detailed in MDEV-9781, APT 1.2.7 (and later) prefers SHA2 GPG keys and now prints warnings when a repository is signed using a SHA1 key like our previous GPG key. We have created a SHA2 key for use with these.
Information about this key:
The short Key ID is: 0xC74CD1D8
The long Key ID is: 0xF1656F24C74CD1D8
The full fingerprint of the key is: 177F 4010 FE56 CA33 3630 0305 F165 6F24 C74C D1D8
Usage of the apt-key command is deprecated in the latest versions of Debian and Ubuntu, and the replacement method is to download the keyring file to the /etc/apt/trusted.gpg.d/ directory. This can be done with the following:
MariaDB Community Server RPM / Source Keys
Beginning in 2023 we migrated the key used to sign our yum/dnf/zypper repositories and to sign our source code and binary tarballs to the same key we use for Debian and Ubuntu.
Key ID and Fingerprint information is in the , above.
The key can be imported on RPM-based systems using the following command:
or
The GPG Key ID of the MariaDB signing key we used for yum/dnf/zypper repositories and to sign our source code tarballs until the end of 2022 was 0xCBCB082A1BB943DB
MariaDB Enterprise GPG Keys
Information about the key we use on most platforms for MariaDB Enterprise Server releases:
The short Key ID is: 0xE3C94F49
The long Key ID is: 0xCE1A3DD5E3C94F49
MariaDB MaxScale GPG Keys
In December 2025, moved to using the same GPG key used by MariaDB Enterprise Server for RHEL 10 and Debian 13 Trixie.
Information on this key:
The short Key ID is: 0x8C27D14E
The long Key ID is: 0x5D87FACA8C27D14E
Configuring Repositories
See the page for details on using the mariadb_repo_setup and mariadb_es_repo_setup scripts to configure repositories that use these keys.
See the on configuring MariaDB Foundation repositories that use these keys.
This page is licensed: CC BY-SA / Gnu FDL
Installing MariaDB Alongside MySQL
Instructions for installing MariaDB on the same server as an existing MySQL installation, useful for migration testing or running multiple versions.
MariaDB was originally designed as a drop-in replacement of MySQL, with more features, new storage engines, fewer bugs, and better performance, but you can also install it alongside MySQL. (This can be useful, for example, if you want to migrate databases/applications one by one.)
Here are the steps to install MariaDB near an existing MySQL installation.
Download the compiled binary tar.gz file that contains the latest version.
Extract the files in a directory of your choice. In the following, we assume you chose the /opt directory.
Create data directory and symlinks as below:
Create group mariadb and user mariadb and set correct ownerships:
Create a new my.cnf in /opt/mariadb from support files:
Edit the file /opt/mariadb-data/my.cnf and add custom paths, socket, port, user and the most important of all: data directory and base directory. Finally the file should have at least the following:
Copy the init.d script from support files in the right location:
Edit /etc/init.d/mariadb replacing mysql with mariadb as below:
The trickiest part will be the last changes to this file. You need to tell mariadb to use only one configuration file. In the start section after**$bindir/mysqld_safe** add --defaults-file=/opt/mariadb-data/my.cnf. Finally the lines should look like:
The same change needs to be made to the command below in the wait_for_ready() function so that the mariadb start command can properly listen for the server start. In the wait_for_ready() function, after $bindir/mariadb-admin add --defaults-file=/opt/mariadb-data/my.cnf. The lines should look like:
Run by explicitly giving it the my.cnf file as argument:
Now you can start MariaDB by
Make MariaDB start at system start:
Finally test that you have both instances running:
What about MariaDB Upgrades ?
By having the mariadb.socket, my.cnf file and databases in /opt/mariadb-data means that if you want to upgrade the MariaDB version you will only need to:
Extract the new version from the archive in /opt near the current version,
Stop MariaDB.
Change the symlink mariadb to point to the new directory.
This page is licensed: CC BY-SA / Gnu FDL
Installing MariaDB Binary Tarballs
A guide to installing MariaDB from pre-compiled binary tarballs on Linux, allowing for flexible installation paths and multiple versions.
Binary tarballs (bintars) are compressed tar archives that contain pre-compiled executables, libraries, and other deployment dependencies. They can usually be installed on any modern Linux distribution.
MariaDB Binary tarballs are named following the pattern: mariadb-VERSION-OS.tar.gz. Be sure to download the correct version for your machine.
Some older binary tarballs are marked '(GLIBC_2.14)' or '(requires GLIBC_2.14+)'. These binaries are built the same as the others, but on a newer build host, and they require GLIBC 2.14 or higher. Use the other binaries for machines with older versions of GLIBC installed. Run ldd --version to see which version is running on your distribution.
Others are marked systemd, which are for systems with systemd and GLIBC 2.19 or higher.
Benefits of Binary Tarballs
Binary tarballs provide multiple benefits:
They are highly OS independent. As long as you get the bintar for the architecture, GLIBC version, and if you are using systemd or not, the bintar should work almost anywhere.
You do not need to be root to use them.
Installing binary tarballs
To install the , unpack the distribution into the directory of your choice and run the script.
In the example below, we install MariaDB in the /usr/local/mysql directory (this is the default location for MariaDB for many platforms). However, any other directory should work too.
We install the binary with a symlink to the original name. This is done so that you can easily change MariaDB versions just by moving the symlink to point to another directory.
Ensure You Use the Correct my.cnf Files
MariaDB searches for the configuration files '/etc/my.cnf' (on some systems '/etc/mysql/my.cnf') and '~/.my.cnf'. If you have an old my.cnf file (maybe from a system installation of MariaDB or MySQL), you need to take care that you don't accidentally use the old one with your new binary .tar installation.
The normal solution for this is to ignore the my.cnf file in /etc when you use the programs in the tar file.
This is done by in your home directory and telling ,, and possibly to only use this one with the option '--defaults-file=~/.my.cnf'. Note that this has to be the first option for the above commands!
Installing MariaDB as root in /usr/local/mysql
If you have root access to the system, you probably want to install MariaDB under the user and group 'mysql' (to keep compatibility with MySQL installations):
The symlinking with ln -s is recommended as it makes it easy to install many MariaDB versions at the same time (for easy testing, upgrading, downgrading, etc).
If you are installing MariaDB to replace MySQL, then you can leave out the call to mariadb-install-db. Instead, shut down MySQL. MariaDB should find the path to the data directory from your old /etc/my.cnf file (path may vary depending on your system).
To start mariadbd, you should now do:
To test the connection, modify your $PATH so you can invoke clients such as , , etc.
You may want to modify your .bashrc or .bash_profile to make it permanent.
Installing MariaDB as Not root in Any Directory
Below, change /usr/local to the directory of your choice.
If you have problems with the above gunzip command line, you can instead, if you have gnu tar, do:
To start mariadbd, you should now do:
Auto Start of mariadbd
You can get mariadbd (the MariaDB server) to autostart by copying the file mysql.server file to the right place.
The exact place depends on your system. The mysql.server file contains instructions on how to use and fine tune it.
For systemd installation, the mariadb.service file will need to be copied from the support-files/systemd folder to the /usr/lib/systemd/system/ folder.
Note that, by default, the /usr/ directory is write protected by systemd, though, so when having the data directory in /usr/local/mysql/data as per the instructions above, you also need to make that directory writable. You can do so by adding an extra service include file:
After this, you can start the service using this command:
Stop the service with this command:
Please refer to the page for further information.
Post Installation
After this, remember to set proper passwords for all accounts accessible from untrusted sources, to avoid exposing the host to security risks!
Also consider using the to when your system boots.
On systems using systemd, instead, enable automatic startup during system boot with this command:
For details on the exact steps used to build the binaries, see the .
This page is licensed: CC BY-SA / Gnu FDL
MariaDB 5.5.33 Debian and Ubuntu Installation Issues
Specific instructions for resolving dependency breakage that occurred with the release of MariaDB 5.5.33 on Debian and Ubuntu systems.
This page is obsolete. The information is old, outdated, or otherwise currently incorrect. We are keeping the page for historical reasons only. Do not rely on the information in this article.
Shortly after the release we became aware of some installation issues with the Debian and Ubuntu repositories. These issues were fixed in , but due to how apt works, steps need to be taken to solve the broken dependencies before upgrading.
We know of three scenarios when dependencies were broken. The steps to fix each of them are pretty much the same, only the list of broken dependencies and hence the list of packages to take care of them differs. The basic idea is to downgrade those certain packages to 5.5.32 temporarily before upgrading them to 5.5.33a.
If you ran into issues when moving from to , look through each of the three scenarios to see which one applies to you and then follow the steps to apply that fix.
Applying the fix
To get your system ready to apply the fix, do the following:
Comment out the standard repo in the /etc/apt/sources.list or /etc/apt/sources.list.d/mariadb.repo file (or wherever you have the repositories configured).
Add a repository to the sources.list. The easiest way is to add the following. Just replace '{os}' and '{dist}' with the appropriate values.
For example, on Debian Wheezy the line would be:
And on Ubuntu Raring the line would be:
Then run 'sudo apt-get update'
Then 'sudo apt-get install' the list of packages to downgrade as given in the applicable section below.
Next, modify our sources.list to remove the 5.5.32 repo and switch back to the normal 5.5 repo
5.5.32 server + 5.5.32 client upgraded to the initial (17 Sep 2013) release of 5.5.33
In this first scenario, both client and server were partially upgraded to 5.5.33 before the process aborted. The problem looks like this:
To fix it, the following server and client packages need to be temporarily downgraded to 5.5.32 (replace 'wheezy' with the name of whatever distribution you are using):
5.5.32 Galera server and 5.5.32 MariaDB client upgraded to 5.5.33
In this scenario, the client upgraded, but Galera-server did not. The problem looks like this:
To fix it, only the client packages need to be temporarily downgraded to 5.5.32 (replace wheezy with whatever your distribution is):
5.3.12 server + 5.3.12 client + 5.5.32 libmariadbclient18 upgraded to 5.5.33
In this scenario, only the library upgraded. The problem looks like this:
To fix it, the library needs to be downgraded to 5.5.32 (replace wheezy with your distribution):
After switching back to the 5.5 repo, the libraries won't get upgraded, they will stay 5.5.32 until you upgrade the server to 5.5.33a.
This page is licensed: CC BY-SA / Gnu FDL
MariaDB Debian Live Images
Information about using MariaDB Debian Live images for testing and offline installation, including boot options and default credentials.
This page is obsolete. The information is old, outdated, or otherwise currently incorrect. We are keeping the page for historical reasons only. Do not rely on the information in this article.
A member of the MariaDB community, Mark <ms (at) it-infrastrukturen (dot) org>,
has created some Debian "squeeze" 6.0.4 based, live iso images with
or 5.3 pre-installed on them and some Debian "squeeze" 6.0.5 based, live iso images with pre-installed on them.
These live and install images can be used to quickly run a MariaDB server in live mode for learning or testing purposes, or to simplify and speed up off-line installations of Debian-based MariaDB servers onto harddisk.
Building MariaDB on CentOS
Instructions for building MariaDB on CentOS, including installing build dependencies with `yum-builddep`.
In the event that you are using the Linux-based operating system CentOS or any of its derivatives, you can optionally compile MariaDB from source code. This is useful in cases where you want use a more advanced release than the one that's available in the official repositories, or when you want to enable certain feature that are not otherwise accessible.
Installing Build Dependencies for
Before you start building MariaDB, you first need to install the build dependencies required to run the compile. CentOS provides a tool for installing build dependencies. The yum-builddep
Build Environment Setup for macOS
Instructions for setting up the build environment on macOS, including installing dependencies via Homebrew and configuring CMake.
Prelude
Building MariaDB on macOS relies on the Apple-provided toolchain and Homebrew for dependencies.
You can install the toolchain without XCode (suggested, unless you have XCode installed already) with:
Homebrew is a package manager for macOS which you can install from
cd mariadb-source
./scripts/make_binary_distribution
cd $PACKAGING_WORK
bakery/preheat.sh
cd bakery_{number}
bakery/tarbake51.sh last:1 $MARIA_WORK
bakery/autobake51-bintar.sh mariadb-{version_num}-maria-beta-ourdelta{number}.tar.gz
In your web browser, navigate to the binary file that you would like to download and copy the URL. For example, to download a binary tarball of MariaDB Enterprise Server 10.6.20-16 for RHEL 8 on x86_64, the URL is:\
FILE_ID is an internal identifier that is different for each file.
Extract the FILE path from the copied URL. For example, to download the file mentioned above, the FILE path is:\
Use your Customer Download Token and the FILE path to construct your customer-specific URL to download the file using command-line tools or automation.For example, to download the file mentioned above, the customer-specific URL is:\
Use your customer-specific URL to download the file using command-line tools or automation:For example, to download the file mentioned above using wget:
They can be installed by anyone to any path, including one's home directory.
You can have any number of different MariaDB installations on the same machine. This is often desired during upgrades when one wants to have the old installation running until switching to the new one.
You can use them on systems for which MariaDB does not support native packages.
CMake should find the dependencies automatically, but we may need to set several environment variables to explicitly point at locations of dependencies installed by Homebrew to avoid conflicts with system-native versions that aren't suitable for building MariaDB. In the worst case scenario, use the following (but you can try building MariaDB first by skipping to the "Run CMake" section below to see if these are necessary in your setup):
The installation location of Homebrew depends on the processor type. Apple Silicon macs will have Homebrew in /opt/homebrew while Intel macs will have Homebrew in /usr/local.
Run CMake
By default, macOS uses a case-insensitive filesystem. When building, we can't create a build subdirectory because BUILD already exists, and all the CMake output will end up mixed in with BUILD. Instead, create a mariadb-build directory as that is unique. cd into mariadb-build and, from there, run CMake with the following flags:
(You can vary the values of these flags depending on what you need to do.)
To install Ninja, run brew install ninja in Terminal.
If CMake runs successfully, you can then run the build itself:
This produces a mariadbd binary at mariadb-build/sql.
# Give extra arguments to mysqld with the my.cnf file. This script
# may be overwritten at next upgrade.
$bindir/mysqld_safe --defaults-file=/opt/mariadb-data/my.cnf --datadir="$datadir" --pid-file="$mysqld_pid_file_path" $other_args >/dev/null 2>&1 &
wait_for_ready () {
[...]
if $bindir/mariadb-admin --defaults-file=/opt/mariadb-data/my.cnf ping >/dev/null 2>&1; then
[root@mariadb-near-mysql opt]# cd mariadb
[root@mariadb-near-mysql mariadb]# scripts/mariadb-install-db --defaults-file=/opt/mariadb-data/my.cnf
[root@mariadb-near-mysql opt]# /etc/init.d/mariadb start
Starting MySQL... [ OK ]
[root@mariadb-near-mysql opt]# cd /etc/init.d
[root@mariadb-near-mysql init.d]# chkconfig --add mariadb
[root@mariadb-near-mysql init.d]# chkconfig --levels 3 mariadb on
groupadd mysql
useradd -g mysql mysql
cd /usr/local
tar -zxvpf /path-to/mariadb-VERSION-OS.tar.gz
ln -s mariadb-VERSION-OS mysql
cd mysql
./scripts/mariadb-install-db --user=mysql
chown -R root .
chown -R mysql data
./bin/mariadbd-safe --user=mysql &
or
./bin/mariadbd-safe --defaults-file=~/.my.cnf --user=mysql &
export PATH=$PATH:/usr/local/mysql/bin/
cd /usr/local
gunzip < /path-to/mariadb-VERSION-OS.tar.gz | tar xf -
ln -s mariadb-VERSION-OS mysql
cd mysql
./scripts/mariadb-install-db --defaults-file=~/.my.cnf
Impact: Custom monitoring scripts using ps, pidof, or pgrep to look for mysqld will fail and must be updated to look for mariadbd.
innodb_buffer_pool_instances
8
1
Multiple instances no longer reduce contention and are ignored.
slave_parallel_mode
conservative
optimistic
Speeds up replication by default.
Command / Operation
Legacy Privilege (10.4)
New Required Privilege (10.5)
SHOW REPLICA STATUS
REPLICATION CLIENT
REPLICA MONITOR
SHOW BINLOG EVENTS
REPLICATION SLAVE
BINLOG MONITOR
SHOW SLAVE HOSTS
REPLICATION CLIENT
REPLICATION MASTER ADMIN
PURGE BINARY LOGS
SUPER
BINLOG ADMIN
Parameter
10.4 Default
10.5 Default
Impact
innodb_adaptive_hash_index
ON
OFF
Disabled to prevent potential performance issues.
innodb_change_buffering
all
none
"all" was found to cause performance loss in certain workloads.
innodb_log_files_in_group
2
1
Redo logs are no longer split; additional files are ignored.
The key can be added on Debian-based systems using the following command:
. The short form of the id is
0x1BB943DB
and the full key fingerprint is:
This key was used by the yum/dnf/zypper repositories for RedHat, CentOS, Fedora, openSUSE, and SLES.
If you configure the mariadb.org rpm repositories using the repository configuration tool then your package manager will prompt you to import the key the first time you install a package from the repository.
You can also import the key directly using the following command:
The full fingerprint of the key is: 4C47 0FFF EFC4 D3DC 5977 8655 CE1A 3DD5 E3C9 4F49
On Debian / Ubuntu systems, you can install the keyring containing this key with:
The key can be imported on RPM-based systems using the following command:
or
For RHEL, AlmaLinux, Rocky, and Oracle Linux 10 and above, and for Debian 13 Trixie and above there are new requirements around GPG keys used to sign rpm packages. For these distributions we have created a stronger GPG key for our Enterprise Server releases.
Information on this key:
The short Key ID is: 0x8C27D14E
The long Key ID is: 0x5D87FACA8C27D14E
The full fingerprint of the key is: BB2A 36F3 6C3B 4D37 3BAC 328A 5D87 FACA 8C27 D14E
On Debian / Ubuntu systems, you can install the keyring containing this key with:
The key can be imported on RPM-based systems using the following command:
or
The full fingerprint of the key is: BB2A 36F3 6C3B 4D37 3BAC 328A 5D87 FACA 8C27 D14E
On Debian / Ubuntu systems, you can install the keyring containing this key with:
The key can be imported on RPM-based systems using the following command:
or
Information on the key used by MaxScale repositories prior to December 2025:
The short Key ID is: 0xE3C94F49
The long Key ID is: 0xCE1A3DD5E3C94F49
The full fingerprint of the key is: 4C47 0FFF EFC4 D3DC 5977 8655 CE1A 3DD5 E3C9 4F49
On Debian / Ubuntu systems, you can install the keyring containing this key with:
The key can be imported on RPM-based systems using the following command:
Then 'sudo apt-get update' to get things back to normal
As a final optional step, once your normal mirror has at least you can 'sudo apt-get upgrade' to upgrade. To check what version of MariaDB our mirror has, run the following command (after running 'sudo apt-get update'):
To work in live mode the system boots from a usb stick (or CD/DVD) and runs in RAM without touching the system's harddisk drive.
The same usb stick (or CD/DVD media) can be used to install a complete server installation onto the harddisk drive using the included Debian installer.
All required MariaDB packages are included on the media, so there is no need for an Internet connection.
Three types of images are provided, text (command line), LXDE, and Gnome. The
text-based live images can be used for testing or server off-line installations. The two gui types, LXDE and Gnome, can be used for testing/learning in live mode or for off-line desktop installations. Debian live images with LXDE (gnome, KDE or awesome) are pretty comfortable for daily work as a replacement for whatever desktop OS is installed on the system.
There are three iso images for each type, one for 32-bit (i386) systems, one for 64-bit (amd64) systems, and one with both.
Live iso images (text) for i386, amd64 or multi architectures.
The LXDE and Gnome images contain documentation under /srv/PDF. Including
instructions on how to create your own Debian live images in live mode (you
need 16GB RAM or more to be able to do this). See the README, README.live, and
live-manual.en.pdf files under /srv/PDF for details.
Note: Some HP notebooks are not able to boot binary hybrid iso images from a USB stick.
Downloads
To get the iso images you can use rsync:
or just use the links above (or go to:).
Preparing of bootable media:
A USB stick or CD/DVD can be used as bootable media. The preferred way is a USB stick.
for Linux: dd if=./<image_name_as_above.iso> of=/dev/<USB-stick-ID_like_sdb_or_sdc>
for other systems: cygwin includes dd and some other linux/Unix tools.
The iso images have been successfully tested on:
Acer ASPIRE @ne netbooks (1GB RAM)
ThinkPad T60p and T61p notebooks (2 or 4GB RAM)
Xeon E31270 / Asus P8BWS desktop (16GB ECC RAM)
AMD FX-4100 / Asus M5A99X EVO desktop (16GB ECC RAM)
HP DL385g7 Opteron 6170SE or 6180SE servers (32 or 64GB ECC RAM)
Notes
It is possible to add some options on the bootline for special purposes like,
for example, the installation of additional packages from a local repository on
the image or assigning a static IP address and running sshd.
To configure a static IP use "ip=". For example:
"ip=eth0:192.168.1.53:255.255.255.0:192.168.1.1"
The full format of "ip=" is: "ip=[interface]:[IP_address]:[netmask]:[gateway]"
If you use an empty "ip=" value the content of /etc/network/interfaces
and /etc/resolv.conf will be used. Without the "ip=" option, dhcp
will be used to get an IP address.
For installing and running sshd (so that the image can act as a server in a
test environment) use: "sshd=on"
The live user is "sql" and the password is "live". Please change the
password immediately after first login!
Depending on the image or 5.3 server is installed. There is no
root passord for the database set so please set a password immediately
after first login!
Run repo-off-line.sh to activate local repositories on the image for
apt-get (for off-line installations) or repo-on-line.sh for internet
repositories.
The binary hybrid live iso images with multiple-choices inside the boot
menu allow for the assignment of two different IPs. (e.g. for testing of
clustered database operations)
Send any feedback or suggestions related to these images to:
Mark <ms (at) it-infrastrukturen (dot) org>
This page is licensed: CC BY-SA / Gnu FDL
utility reads a package and generates a list of the packages required to build from source, then calls YUM to install them for you. In the event that this utility is not available on your system, you can install it through the
yum-utils
package. Once you have it, install the MariaDB build dependencies.
Running the above command installs many of the build dependencies, but it doesn't install all of them. It will only install dependencies for , which is not enough if you want to compile a newer MariaDB version!
Installing Build Dependencies for newer MariaDB versions
The following commands installs all packages needed to get and compile MariaDB 10.11:
You can replace openssl with gnutls above, depending on the TLS implementation you want to use.
If you plan to use the BUILD scripts to make it easier to build different configurations of MariaDB,
then you should also install ccache to speed up your compilations:
If you want to test the MariaDB installation, with the include mysql-test-run (mtr) system, you also need to install and configure cpan:
Once you have the base dependencies installed, you can retrieve the source code and start building MariaDB. The source code is available on GitHub. Use the --branch option to specify the particular version of MariaDB you want to build.
With the source repository cloned onto your system, you can start building MariaDB. Run CMake to ready MariaDB for the build,
Once CMake readies the relevant Makefile for your system, use Make to build MariaDB.
This generates an RPM file, which you can then install on your system or copy over to install on other CentOS hosts. The umask is needed because of a bug in cmake / cmake scripts.
Alternative, use one of the build scripts in the BUILD directory that allows you to compile different versions of MariaDB (debug, optimized, profiling etc).
A good option for developers is:
Creating MariaDB-compat package
MariaDB-compat package contains libraries from older MariaDB releases. They cannot be built from the current source tree, so cpack creates them by repackaging old MariaDB-shared packages. If you want to have -compat package created, you need to download MariaDB-shared-5.3 and MariaDB-shared-10.1 rpm packages for your architecture (any minor version will do) and put them one level above the source tree you're building. CMake will pick them up and create a MariaDB-compat package. CMake reports it as
Additional Dependencies
In the event that you miss a package while installing build dependencies, CMake may continue to fail after you install the necessary packages. If this happens to you, delete the CMake cache then run the above the command again:
When CMake runs through the tests again, it should now find the packages it needs, instead of the cache telling it they're unavailable.
Explains the differences between official Debian/Ubuntu repository packages and those from MariaDB.org, particularly regarding library linking and configuration defaults.
The .deb packages provided by MariaDB Foundation's and MariaDB Corporation's repositories are not identical to the official .deb packages provided by Debian's and Ubuntu's default repositories.
The packages provided by MariaDB Foundation's and MariaDB Corporation's repositories are generated using the Debian packaging in MariaDB's official source code. The Debian packaging scripts are specifically in the debian/ directory.
The packages provided by Debian's and Ubuntu's default repositories are generated using the Debian packaging in Debian's mirror of MariaDB's source code, which contains some custom changes. The source tree can be found here:
As a consequence, MariaDB behaves a bit differently if it is installed from Debian's and Ubuntu's default repositories.
Option File Locations
The located at /etc/mysql/my.cnf is handled by the mechanism when the mysql-common package is installed. It is a symbolic link that references either mysql.cnf or mariadb.cnf depending on whether MySQL or MariaDB is installed. Most of the MariaDB are therefore actually located in /etc/mysql/mariadb.d/.
System Variables
Since there is no system variable difference from the Standard MariaDB.
Variable
MariaDB in Debian
Standard MariaDB
Notes
Options
Option
MariaDB in Debian
Standard MariaDB
Notes
TLS
MariaDB binaries from packages provided by Debian's and Ubuntu's default repositories are linked with a different TLS library than MariaDB binaries from packages provided by MariaDB Foundation's and MariaDB Corporation's repositories.
MariaDB Server binaries:
MariaDB Server is statically linked with the bundled libraries in packages provided by Debian's and Ubuntu's default repositories.
Authentication
The authentication plugin is installed by default in new installations that use the packages provided by Debian's default repositories in Debian 9 and later and Ubuntu's default repositories in Ubuntu 15.10 and later.
The root@localhost created by will also be created to authenticate via the authentication plugin in these builds.
See Also
More Information
For details, check out the Debian and Ubuntu official repositories:
This page is licensed: CC BY-SA / Gnu FDL
Building MariaDB on FreeBSD
Instructions for building MariaDB on FreeBSD using Ports or Poudriere, including configuring build options.
It is relatively straightforward to build MariaDB from source on FreeBSD. When working with an individual host, you can use Ports to compile particular or multiple versions of MariaDB. When working with multiple hosts, you can use Poudriere to build MariaDB once, then serve it as a package to multiple FreeBSD hosts.
Using Ports
The FreeBSD Ports Collection provides a series of Makefiles that you can use to retrieve source code, configure builds, install dependencies and compile software. This allows you to use more advanced releases than what is normally available through the package managers as well as enable any additional features that interest you.
In the event that you have not used Ports before on your system, you need to first fetch and extract the Ports tree. This downloads the Ports tree from FreeBSD and extracts it onto your system, placing the various Makefiles, patches and so on in the /usr/ports/ directory.
In the event that you have used Ports before on this system, run Portsnap again to download and install any updates to the Ports tree.
This ensures that you are using the most up to date release of the Ports tree that is available on your system.
Building MariaDB from Ports
Once Portsnap has installed or updated your Ports tree, you can change into the relevant directory and install MariaDB. Ports for MariaDB are located in the /usr/ports/databases/ directory.
Note that FreeBSD treats the Server and Client as separate packages. The Client is a dependency of the Server, so you only need to build the Server to get both. It also provides a number of different versions. You can search the available ports from . Decide what version of MariaDB you want to install, the change into the relevant directory. Once in the directory, run Make to build MariaDB.
In addition to downloading and building MariaDB, Ports also downloads and build any libraries on which MariaDB depends. Each port it builds will take you to a GUI window where you can select various build options. In the case of MariaDB, this includes various storage engines and specific features you need in your build.
Once you finish building the ports, install MariaDB on your system and clean the directory to free up disk space.
This installs FreeBSD on your server. You can now enable, configure and start the service as you normally would after installing MariaDB from a package.
Using Poudriere
Poudriere is a utility for building FreeBSD packages. It allows you to build MariaDB from a FreeBSD Jail, then serve it as a binary package to other FreeBSD hosts. You may find this is particularly useful when building to deploy multiple MariaDB servers on FreeBSD, such as with Galera Cluster or similar deployments.
Building MariaDB
Once you've configured your host to use Jails and Poudriere, initialize a jail to use in building packages and a jail for managing ports.
This creates two jails, package-builder and local-ports, which you can then use to build MariaDB. Create a text file to define the packages you want to build. Poudriere will build these packages as well as their dependencies. MariaDB is located at databases/mariadb103-server. Adjust the path to match the version you want to install.
Use the options command to initialize the build options for the packages you want Poudriere to compile.
Lastly, use the bulk command to compile the packages.
Using Poudriere Repositories
In order to use Poudriere, you need to set up and configure a web server, such as Nginx or Apache to serve the directory that Poudriere built. For instance, in the case of the above example, you would map to the package-builderjail: /usr/local/poudriere/data/packages/package-builder/.
You may find it useful to map this directory to a sub-domain, for instance httpspkg.example.com or something similar.
Lastly, you need to configure the FreeBSD hosts to use the Poudriere repository you just created. On each host, disable the FreeBSD official repositories and enable your Poudriere repository as an alternative.
Then add the URL for your Poudriere repository to configuration file:
You can then install MariaDB from Poudriere using the package manager.
This page is licensed: CC BY-SA / Gnu FDL
Compiling with the InnoDB Plugin from Oracle
Historical guide on compiling older MariaDB versions with the original Oracle InnoDB plugin instead of XtraDB.
MariaDB uses InnoDB as the default storage engine.
If you want to use Oracle's InnoDB plugin, then you need to compile MariaDB andnot specify --without-plugin-innodb_plugin when configuring. For example, a simple ./configure without any options will do.
When the InnoDB plugin is compiled, the innodb_plugin test suite will test the InnoDB plugin in addition to xtradb:
./mysql-test-run --suite=innodb_plugin
To use the innodb_plugin instead of xtradb you can do (for ):
See Also
This page is licensed: CC BY-SA / Gnu FDL
Upgrade MariaDB Enterprise Server from 10.6 to 11.4
The upgrade guide details the standard upgrade path from MariaDB Enterprise Server 10.6 to MariaDB Enterprise Server 11.4. The upgrade process involves significant changes, particularly to the query optimizer, which was rewritten in version 11.0. While performance is generally improved, query execution plans may change.
This guide provides two strategies:
Standard In-Place Upgrade: The direct procedure for upgrading an existing node.
Staged Rollout (Recommended for Mission-Critical Systems): A low-risk approach using replication and validation.
Installing MariaDB on macOS
How to install MariaDB Server on macOS using the Homebrew package manager, including starting the service and securing the installation.
MariaDB Server is available for installation on macOS via the package manager. MariaDB Server (together with many client programs and helper tools) is available as a Homebrew "bottle", a precompiled package. If you haven't yet installed Homebrew, .
Installing & Starting MariaDB
Install MariaDB Server:
Building MariaDB on Windows
Guide to building MariaDB on Windows using Visual Studio, CMake, and Git, including creating ZIP and MSI packages.
Build Requirements
To build MariaDB you need the following:
: We currently support Visual Studio 2019 and 2022. Generally we try to support the two most recent VS versions, but build ourselves using the last one. Community editions will work fine; we only use them in our builds.
While installing Visual Studio, make sure to add "Desktop Development with C++".
Also, make sure to use
Build Environment Setup for Linux
Lists required tools and dependencies for building MariaDB on Linux, and how to install them using package managers.
Required Tools
The following is a list of tools that are required for building MariaDB on Linux and Mac OS X. Most, if not all, of these will exist as packages in your distribution's package repositories, so check there first. See , , and pages for specific requirements for those platforms.
deb http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.32/repo/{os} {dist} main
deb http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.32/repo/debian wheezy main
deb http://ftp.osuosl.org/pub/mariadb/mariadb-5.5.32/repo/ubuntu raring main
apt-cache show mariadb-server | grep Version
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libmariadbclient18 : Depends: libmysqlclient18 (= 5.5.32+maria-1~wheezy) but 5.5.33+maria-1~wheezy is installed
libmysqlclient18 : Depends: libmariadbclient18 (= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
mariadb-client-5.5 : Depends: libmariadbclient18 (>= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
mariadb-client-core-5.5 : Depends: libmariadbclient18 (>= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
mariadb-server : Depends: mariadb-server-5.5 (= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
mariadb-server-core-5.5 : Depends: libmariadbclient18 (>= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
The following packages have unmet dependencies:
libmariadbclient18 : Depends: libmysqlclient18 (= 5.5.32+maria-1~wheezy) but 5.5.33+maria-1~wheezy is installed
libmysqlclient18 : Depends: libmariadbclient18 (= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
mariadb-client-5.5 : Depends: libmariadbclient18 (>= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
mariadb-client-core-5.5 : Depends: libmariadbclient18 (>= 5.5.33+maria-1~wheezy) but 5.5.32+maria-1~wheezy is installed
The following packages have unmet dependencies:
libmariadbclient18: Depends: libmysqlclient18 (= 5.5.32+maria-1~lucid) but 5.5.33+maria-1~lucid is installed
libmysqlclient18: Depends: libmariadbclient18 (= 5.5.33+maria-1~lucid) but 5.5.32+maria-1~lucid is installed
$ ls ../*.rpm
../MariaDB-shared-10.1.17-centos7-x86_64.rpm
../MariaDB-shared-5.3.12-122.el5.x86_64.rpm
$ cmake -DRPM=centos7 .
...
Using ../MariaDB-shared-5.3.12-122.el5.x86_64.rpm to build MariaDB-compat
Using ../MariaDB-shared-10.1.17-centos7-x86_64.rpm to build MariaDB-compat
In contrast, MariaDB Server is dynamically linked with the system's OpenSSL libraries in .deb packages provided by MariaDB Foundation and MariaDB Corporation.
MariaDB's clients and utilities and are dynamically linked with the system's GnuTLS libraries in .deb packages provided by Debian's and Ubuntu's default repositories. libmysqlclient is still statically linked with the bundled wolfSSL libraries.
MariaDB's clients and utilities and are dynamically linked with the system's GnuTLS libraries in .deb packages provided by Debian's and Ubuntu's default repositories. libmysqlclient is still statically linked with the bundled libraries.
In contrast, MariaDB's clients and utilities, , and are dynamically linked with the system's libraries in packages provided by MariaDB Foundation's and MariaDB Corporation's repositories.
This section details the standard procedure for performing an in-place upgrade. This involves replacing the server binaries while keeping the data directory intact.
1. Backup Database
Before performing any upgrade, it is critical to perform a full backup of your database. MariaDB Backup (mariadb-backup) is recommended for this purpose.
2. Modify Repository Configuration
Update your system's package manager repository to point to MariaDB Enterprise Server 11.4. You will need to regenerate your repository configuration command using the MariaDB Customer Download Token.
3. Stop MariaDB Service
Stop the running mariadbd process to release locks on the data files.
Ensure innodb_fast_shutdown is set to 1 and check for open XA transactions before stopping.
4. Uninstall Old Version
Remove the existing MariaDB 10.6 packages. This removes the binaries but preserves the configuration and data directory.
5. Install New Version
Install the new MariaDB 11.4 packages.
6. Update Configuration (Critical)
Before starting the server, you must update your option files (e.g., my.cnf) to remove unsupported parameters.
Remove innodb_defragment: This variable and its associated options (e.g., innodb_defragment_fill_factor) have been removed.
Remove optimizer_adjust_secondary_key_costs: This variable has no effect in 11.4 and must be removed.
Check innodb_flush_method: This variable is deprecated in 11.4.
7. Start MariaDB Service
Start the new mariadbd process.
8. Run mariadb-upgrade
Execute mariadb-upgrade to check and update system tables to be compatible with the new version.
Part 2: Alternative Strategy: Staged Rollout for Mission-Critical Systems
For environments sensitive to performance changes or requiring zero downtime, the following staged rollout strategy is recommended.
1
Introduce Replica
Provision a new server with MariaDB Enterprise Server 11.4 and configure it as a Replica of your existing 10.6 Primary server.
Perform Backup on Primary (10.6): Use mariadb-backup to create a consistent, non-blocking physical backup.
Prepare the Backup: Prepare the backup to ensure consistency (this can be done on the Primary or the Replica).
Restore on Replica (11.4): Transfer the backup to the new 11.4 server, stop the service, and restore.
Start and Configure Replication: Start the 11.4 server and configure it to replicate from the 10.6 Primary.
Log in to the 11.4 Replica and enable replication. (Note: Ensure server_id is unique in my.cnf).
2
Validate and Compare (Recommended)
To proactively catch performance regressions caused by the optimizer rewrite, use MaxScale with the Diff Router(Enterprise feature).
3
Shift Read Traffic
Gradually migrate read-only traffic to the 11.4 replica.
Update MaxScale Routing If using MaxScale, you can adjust the server weights or maintenance modes to direct read traffic.
4
Promote to Primary
Once the 11.4 replica has been validated under load, promote it to be the Primary node.
Stop Replication on 11.4 Replica
5
Shift Application Traffic
Direct your application traffic to the new 11.4 Primary. Ensure you perform a mariadb-upgrade on the new Primary if it hasn't been run yet (though mariadb-backup restore usually preserves the old system tables, running upgrade is a safety step to ensure system tables are fully compatible with 11.4).
Part 3: Critical Upgrade Information
1. Optimizer Changes and Application Testing
The Query Optimizer was rewritten in version 11.0. While performance is generally better, query plans can change. It is vital to perform validation (as described in the Staged Rollout section) to catch regressions before production deployment. You should also run ANALYZE TABLE on major tables after upgrading to update statistics.
2. Required Configuration Changes
The following variables must be addressed in your configuration files (my.cnf) to prevent startup failures or warnings:
optimizer_adjust_secondary_key_costs: MUST REMOVE. This variable has no effect in 11.4 as features are integrated into the new cost model.
innodb_defragment: MUST REMOVE. This variable has been removed.
des_encrypt / des_decrypt: Functions have been removed.
3. Backward Replication Compatibility
You can replicate from a MariaDB 11.4 Primary to a MariaDB 10.6 Replica (Backward Replication) under specific conditions:
No new features specific to 11.4 (e.g., new JSON functions, UUID data type) are used in DML or DDL.
The variable binlog_alter_two_phase must be set to 0 (default) on the 11.4 Primary.
4. System-Versioned Tables Conversion
If using System-Versioned Tables, the row_end column format must be updated to support the extended TIMESTAMP range (up to year 2106).
Use the new --update-history option with mariadb-dump to convert row_end values during export.
Use ALTER TABLE to convert the tables after upgrade.
This can take several minutes to complete, depending on hardware, network, and other factors.
Start MariaDB Server:
Alternatively, and strongly recommended, automatically start MariaDB Server:
Automatically starting MariaDB server installs a background service on macOS. Make sure to allow adding that background service. See this section for more information.
Connecting to MariaDB Server
After MariaDB Server has started, you can connect to the server using the shell user name (see this section for information on the user):
Alternatively, connect as root:
For graphical clients you can use instead of the mariadb command-line client, see this section.
Upgrading MariaDB
Update Homebrew packages:
Then upgrade MariaDB Server:
Notes & Further Information
Homebrew Installation
Install Homebrew like this:
Open a Terminal (⌘ + Space to open Spotlight, type Terminal).
Issue this command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Alternatively, use the package installer (.pkg; at the time of writing this, )
Refer to the for more information, particularly to the .
MariaDB Configuration
In Homebrew, the configuration file for MariaDB is located at:
/usr/local/etc/my.cnf for Intel-based Macs.
/opt/homebrew/etc/my.cnf for Apple Silicon Macs (ARM architecture).
MariaDB Information
Find information about the MariaDB version, analytics, and more, using the brew info command:
MariaDB Programs
MariaDB Server (mariadbd), the MariaDB command-line client (mariadb), and many more clients and tools are installed in /opt/homebrew/Cellar/mariadb (for Apple Silicon Macs). Find the location for your machine, as well as the MariaDB programs installed, with these commands:
Terminal User & MariaDB User
To find out which user is used, issue these commands in a shell like Terminal:
macOS Background Service
If you start MariaDB automatically, a macOS background service is added. You can find the MariaDB background service in System Settings > General > Login Items & Extensions. It's named mariadbd-safe.
The toggle switch allows you to turn off the automatic start of MariaDB. This prevents MariaDB Server from automatically starting once you reboot macOS.
To review the resource usage of MariaDB Server, use this command (type q to exit topwhen done):
Assuming a standard Homebrew installation of MariaDB, and assuming you connect to MariaDB Server using the standard shell user, configure Beekeeper Studio like this:
Connection type: MariaDB
Authentication method: Username/Password
Connection mode: Socket
Socket path: /tmp/mysql.sock
Username: (name of the shell user, without the @localhost suffix)
Once connected to MariaDB Server, you can run queries in Beehive Studio:
The query shown in this screenshot uses a MariaDB sample database called nation which you can use to get familiar with MariaDB. See this section for more information.
Unzip nation.zip, then import the database into MariaDB Server, using this command (assuming you downloaded and unzipped the sample database in the Downloads folder):
When done, use that database in the mariadb command-line client, like this:
In addition to the "bottled" MariaDB Server package available from Homebrew, you can use Homebrew to build MariaDB from source. This is useful if you want to use a different version of the server or enable some different capabilities that are not included in the bottle package.
Two components not included in the bottle package are the CONNECT and OQGRAPH engines, because they have non-standard dependencies. To build MariaDB Server with these engines, you must first install boost and judy. Follow these steps to install the dependencies and build the server:
You can also use Homebrew to build and install a pre-release version of MariaDB Server. Use this command to build and install a "development" version of MariaDB Server:
CMake: We recommend the latest release. Older releases might not support your version of Visual Studio. Visual Studio 2019 requires cmake 3.14 at least.
Git: Required to
build newer versions from the source tree.
NOTE: run
after the installation, otherwise some mtr tests will fail
In the "Adjusting your PATH" dialog, choose "Use Git from Windows command prompt", otherwise wrong (mingw64) git and perl will be in your PATH
Bison from GnuWin32:
Bison creates parts of the SQL parser. Choose "Complete package except
sources" when downloading.
NOTE: Do not install this into your default path with spaces
(e.g. under C:\Program Files\GnuWin32); the build will break due to this bison bug.
Instead, install into C:\GnuWin32.
Add C:\GnuWin32\bin to your system PATH after installation.
: Used to run the test suite. is
another Win32 Perl distribution and should work as well (but it is not as
well tested). NOTE: Cygwin or mingw Perl versions will not work for testing. Use Windows native Perl, please.
Optional: If you intend to build the MSI packages, install . If you build MSI with 10.4,
also modify your Visual Studio installation, add "Redistributable MSMs" (see )
, needed if you run mysql-test-run.pl tests.
Verify that bison.exe, or git.exe, cmake.exe and perl.exe can be found in the PATH
environment variable with "where bison", "where git", "where perl" etc. from
the command line prompt.
Building Windows Binaries
The above instructions assume or higher.
Branch the MariaDB repository, or unpack the source archive. On the command
prompt, switch to your source directory, then execute:
The above example builds a release configured for 64 bit systems in a
subdirectory named bld. "cmake ..." is the configuration step,
"cmake --build . --config Relwithdebinfo" is the build step.
Build Variations
Debug Builds
Building Debug version is done with:
32bit and 64 bit Builds
Build 64 bit binary
Visual Studio 2019-2022 cmake generator will use host architecture by default, that is, with the steps above, cmake will build x64 binaries on x64 machine.
Build 32 bit binary
pass -A Win32 parameter for cMake, like this
Historical note:
With Visual Studio 2017 and earlier, one had to pass the name of 32bit generator ,e.g
cmake .. -G "Visual Studio 15 2017
For a complete list of available generators, call cmake without any parameters.
IDE Builds
Instead of calling "cmake --build" as above, open solution file MariaDB.sln (in older versions, prior to 11.0, MySQL.sln ). When Visual Studio starts, choose Build/Compile.
Building the ZIP Package
This is how it is "done by the book", standard cmake target.
MariaDB however uses non-standard target win_package for the packaging for its releases, it generates 2 ZIPs, a slim one with executables, and another one with debuginfo (.PDB files). The debuginfo is important to be able to debug released binaries, and to analyze crashes.
Building the MSI Package
Including HeidiSQL in the MSI Installer
Starting with , it is possible to build an installer which
includes 3rd party products, as described in MWL#200. Currently only HeidiSQL support is implemented; it is also
included in the official builds. Use the CMake parameter-DWITH_THIRD_PARTY=HeidiSQL to include it in the installer.
Code Signing
MariaDB builds optionally support authenticode code signing with an optional
parameter SIGNCODE. Use cmake -DSIGNCODE=1 during the
configuration step to sign the binaries in the ZIP and MSI packages.
Important: for SIGNCODE=1 to work, the user that runs the build needs to
install a valid authenticode digital certificate into their certificate store,
otherwise the packaging step will fail.
Building Packages for MariaDB Releases
The full script to create the release in an out-of-source build with Visual
Studio with signed binaries might look like:
This command sequence will produce a ZIP package (e.g mariadb-5.2.6-win32.zip)
and MSI package (e.g mariadb-5.2.6-win32.msi) in the bld directory.
Running Tests
Important: Do not use Cygwin bash, MinGW bash, Git bash, WSL bash, or any other bash when running the test suite. You will then very likely use the wrong version of Perl too (a "Unix-flavoured" one on Windows), and spend a lot of time trying to figure out why this version of Perl does not work for the test suite. Use native perl, in cmd.exe , or powershell instead,
Switch mysql-test subdirectory of the build directory
Run the test suite
Running a Test Under Debugger
Assuming VS is installed on the machine
If vsjitdebugger does not start, you can edit AeDebug registry key as mentioned in
pcre2-devel (optiona, will be automatically downloaded and installed if not on the system)
ccache ; Will speed up builds if you are going to use the scripts in the BUILD directory.
ctags or universal-ctags ; If you plan to use BUILD scripts and local editors
You can install these programs individually through your package manager.
In addition, some package managers support the use a build dependency command. When using this command, the package manager retrieves a list of build dependencies and install them for you, making it much easier to get started on the compile. The actual option varies, depending on the distribution you use.
On Ubuntu and Debian you can use the build-dep command.
With openSUSE and SUSE, you can use the source-install command.
Each of these commands works off of the release of MariaDB provided in the official software repositories of the given distribution. In some instances and especially in older versions of Linux, MariaDB may not be available in the official repositories. In these cases you can use the MariaDB repositories as an alternative.
Bear in mind, the release of MariaDB provided by your distribution may not be the same as the version you are trying to install. Additionally, the package managers don't always retrieve all of the packages you need to compile MariaDB. There may be some missed or unlisted in the process. When this is the case, CMake fails during checks with an error message telling you what's missing.
Note: On Debian-based distributions, you may receive a "You must put some 'source' URIs in your sources.list" error. To avoid this, ensure that /etc/apt/sources.list contains the source repositories.
For example, for Debian buster:
Refer to the documentation for your Linux distribution for how to do this on your system.
After editing the sources.list, do:
...and then the above mentioned build-dep command.
Note: On openSUSE the source package repository may be disabled. The following command will enable it:
After enabling it, you will be able to run the zypper command to install the build dependencies.
Detailed steps for installing MariaDB on SLES and OpenSUSE using the `zypper` package manager, including repository configuration and package installation.
On SLES, OpenSUSE, and other similar Linux distributions, it is highly recommended to install the relevant RPM packages from MariaDB's repository using zypper.
This page walks you through the simple installation steps using zypper.
Adding the MariaDB ZYpp repository
We currently have ZYpp repositories for the following Linux distributions:
SUSE Linux Enterprise Server (SLES) 12
SUSE Linux Enterprise Server (SLES) 15
OpenSUSE 15
OpenSUSE 42
Using the MariaDB Package Repository Setup Script
If you want to install MariaDB with zypper, then you can configure zypper to install from MariaDB Corporation's MariaDB Package Repository by using the .
MariaDB Corporation provides a MariaDB Package Repository for several Linux distributions that use zypper to manage packages. This repository contains software packages related to MariaDB Server, including the server itself, , , , and . The MariaDB Package Repository setup script automatically configures your system to install packages from the MariaDB Package Repository.
To use the script, execute the following command:
Note that this script also configures a repository for and a repository for MariaDB Tools, which currently only contains and its dependencies.
See for more information.
Using the MariaDB Repository Configuration Tool
If you want to install MariaDB with zypper, then you can configure zypper to install from MariaDB Foundation's MariaDB Repository by using the .
The MariaDB Foundation provides a MariaDB repository for several Linux distributions that use zypper to manage packages. This repository contains software packages related to MariaDB Server, including the server itself, , , , and . The MariaDB Repository Configuration Tool can easily generate the appropriate commands to add the repository for your distribution.
For example, if you wanted to use the repository to install on SLES 15, then you could use the following commands to add the MariaDB zypper repository:
Pinning the MariaDB Repository to a Specific Minor Release
If you wish to pin the zypper repository to a specific minor release, or if you would like to downgrade to a specific minor release, then
you can create a zypper repository with the URL hard-coded to that specific minor release.
So if you can't find the repository of a specific minor release at yum.mariadb.org, then it would be a good idea to check the archive.
For example, if you wanted to pin your repository to on SLES 15, then you could use the following commands to add the MariaDB zypper repository:
Updating the MariaDB ZYpp repository to a New Major Release
MariaDB's zypper repository can be updated to a new major release. How this is done depends on how you originally configured the repository.
Updating the Major Release with the MariaDB Package Repository Setup Script
If you configured zypper to install from MariaDB Corporation's MariaDB Package Repository by using the , then you can update the major release that the repository uses by running the script again.
Updating the Major Release with the MariaDB Repository Configuration Tool
If you configured zypper to install from MariaDB Foundation's MariaDB Repository by using the , then you can update the major release that the repository uses by removing the repository for the old version and adding the repository for the new version.
First, you can remove the repository for the old version by executing the following command:
After that, you can add the repository for the new version. For example, if you wanted to use the repository to install on SLES 15, then you could use the following commands to add the MariaDB zypper repository:
After that, the repository should refer to .
Importing the MariaDB GPG Public Key
Before MariaDB can be installed, you also have to import the GPG public key that is used to verify the digital signatures of the packages in our repositories. This allows the zypper and rpm utilities to verify the integrity of the packages that they install.
The id of our GPG public key is 0xcbcb082a1bb943db. The short form of the id
is 0x1BB943DB. The full key fingerprint is:
The utility can be used to import this key. For example:
Once the GPG public key is imported, you are ready to install packages from the repository.
Installing MariaDB Packages with ZYpp
After the zypper repository is configured, you can install MariaDB by executing the command. The specific command that you would use would depend on which specific packages that you want to install.
Installing the Most Common Packages with ZYpp
To Install the most common packages, execute the following command:
Installing MariaDB Server with ZYpp
To Install MariaDB Server, execute the following command:
Installing MariaDB Galera Cluster with ZYpp
The process to install MariaDB Galera Cluster with the MariaDB zypper repository is practically the same as installing standard MariaDB Server.
Galera Cluster support has been included in the standard MariaDB Server packages, so you will need to install the MariaDB-server package, as you normally would.
You also need to install the galera-4 package to obtain the 4 wsrep provider library.
To install MariaDB Galera Cluster, you could execute the following command:
If you haven't yet imported the MariaDB GPG public key, then zypper will prompt you to
import it after it downloads the packages, but before it prompts you to install them.
See for more information on MariaDB Galera Cluster.
Installing MariaDB Clients and Client Libraries with ZYpp
has been included as the client library. However, the package name for the client library has not been changed.
To Install the clients and client libraries, execute the following command:
Installing mariadb-backup with ZYpp
To install , execute the following command:
Installing Plugins with ZYpp
Some may also need to be installed.
For example, to install the password validation plugin, execute the following command:
Installing Debug Info Packages with ZYpp
The MariaDB zypper repository also contains packages. These package may be needed when .
Installing Debug Info for the Most Common Packages with ZYpp
To install for the most common packages, execute the following command:
Installing Debug Info for MariaDB Server with ZYpp
To install for MariaDB Server, execute the following command:
Installing Debug Info for MariaDB Clients and Client Libraries with ZYpp
has been included as the client library. However, the package name for the client library has not been changed.
To install for the clients and client libraries, execute the following command:
Installing Debug Info for mariadb-backup with ZYpp
To install for , execute the following command:
Installing Debug Info for Plugins with ZYpp
For some , may also need to be installed.
For example, to install for the password validation plugin, execute the following command:
Installing Older Versions from the Repository
The MariaDB zypper repository contains the last few versions of MariaDB. To show what versions are available, use the following command:
In the output you will see the available versions.
To install an older version of a package instead of the latest version we just
need to specify the package name, a dash, and then the version number. And we
only need to specify enough of the version number for it to be unique from the
other available versions.
However, when installing an older version of a package, if zypper has to install dependencies, then it will automatically choose to install the latest versions of those packages. To ensure that all MariaDB packages are on the same version in this scenario, it is necessary to specify them all.
The packages that the MariaDB-server package depend on are: MariaDB-client,
MariaDB-shared, and MariaDB-common. Therefore, to install from this zypper
repository, we would do the following:
The rest of the install and setup process is as normal.
After Installation
After the installation is complete, you can .
If you are using , then keep in mind that the first node will have to be .
This page is licensed: CC BY-SA / Gnu FDL
Installing MariaDB on IBM Cloud
Step-by-step instructions for deploying MariaDB on IBM Cloud Kubernetes Service, including provisioning clusters and configuring storage.
Get MariaDB on IBM Cloud.
You should have an IBM Cloud account, otherwise you can register here.
At the end of the tutorial you will have a cluster with MariaDB up and running. IBM Cloud uses Bitnami charts to deploy MariaDB on with helm
We will provision a new Kubernetes Cluster for you if, you already have one skip to step 2
We will deploy the IBM Cloud Block Storage plug-in, if already have it skip to step 3
MariaDB deployment
Step 1 provision Kubernetes Cluster
Click the Catalog button on the top.
Select Service from the catalog.
Search for Kubernetes Service and click on it.
Choose a plan: standard or free.
The free plan includes one worker node and no subnet.
To provision a standard cluster, upgrade your account to Pay-As-You-Go.
To upgrade to a Pay-As-You-Go account, follow these steps:
In the console, go to Manage > Account.
Now choose your location settings, for more information please visit
Choose Geography (continent)
Select either Single-Zone or Multi-Zone storage. Single Zone stores your data in one data center, while Multi-Zone distributes your data across multiple zones, offering greater safety in the event of unexpected zone failures.
Choose a Worker Zone if using Single zones or Metro if Multizone
Set up your account with VRF or enable VLAN spanning to use Multizone.
If no Virtual LAN is available at your selected location, a new VLAN will be created for you.
Choose a Worker node setup or use the preselected one.
Choose Master Service Endpoint, In VRF-enabled accounts, you can choose Private endpoint only to make your master accessible on the private network or via VPN tunnel. Choose Public endpoint only to make your master publicly accessible. When you have a VRF-enabled account, your cluster is set up by default to use Both private and public endpoints. For more information visit .
Give Cluster name
Give desired Tags to your cluster, for more information visit
Click Create
Wait for you cluster to be provisioned
Your cluster is ready for usage
Step 2 deploy IBM Cloud Block Storage plug-in
The Block Storage plug-in is a persistent, high-performance iSCSI storage that you can add to your apps by using Kubernetes Persistent Volumes (PVs).
Click the Catalog button on the top
Select Software from the catalog
Search for IBM Cloud Block Storage plug-in and click on it
On the application page, select the cluster you wish to use
Click on Enter or select namespace and choose the default Namespace or use a custom one (if you get error please wait 30 minutes for the cluster to finalize)
Give a Name to this workspace
Click Install and wait for the deployment
Step 3 deploy MariaDB
We will deploy MariaDB on our cluster
Click the Catalog button on the top
Select Software from the catalog
Search for MariaDB and click on it
Please select IBM Kubernetes Service
On the application page, select the cluster you wish to use
Click on Enter or select namespace and choose the default Namespace or use a custom one
Give a unique name to workspace, which you can easily recognize
Select which Resource Group you want to use, it's for access controll and billing purposes. For more information please visit
Give Tags to your MariaDB, for more information visit
Click on Parameters with default values, You can set deployment values or use the default ones
Please set the MariaDB root password in the parameters
After finishing everything, tick the box next to the agreements and click Install
The MariaDB workspace will start installing, wait a couple of minutes
Your MariaDB workspace has been successfully deployed
Verify MariaDB installation
Go to in your browser
Expand Clusters. Click on your cluster
On the Overview page, click Actions, then select Web Terminal from the dropdown menu.
Click Install and wait for sometime
Click on Actions
Click Web terminal. A terminal window will open up
On the terminal window, please change NAMESPACE to the namespace you choose at the deployment setup:
Enter your pod with bash , please replace PODNAME with your mariadb pod's name
After you are in your pod please enter Mariadb and enter your root password after the prompt
You have successfully deployed MariaDB IBM Cloud!
This page is licensed: CC BY-SA / Gnu FDL
Upgrade MariaDB Enterprise Server from 11.4.X to 11.4.Y
Instructions for upgrading to MariaDB Enterprise Server 11.4, which introduces new data types like UUID and INET4, advanced JSON functions, and non-blocking online schema changes.
These instructions detail a minor release upgrade with MariaDB Enterprise Server 11.4 on a range of .
A minor release upgrade is a change from an earlier release of MariaDB Enterprise Server 11.4 to a later release in the same release series.
For example, it would be a minor release upgrade to upgrade from MariaDB Enterprise Server 11.4.4-2 to MariaDB Enterprise Server 11.4.5-3.
Upgrade MariaDB Enterprise Server from 10.6.X to 10.6.Y
Upgrade documentation for MariaDB Enterprise Server 10.6, featuring Atomic DDL support, JSON_TABLE function, improved Oracle compatibility modes, and the removal of older storage engines.
These instructions detail a minor release upgrade with MariaDB Enterprise Server 10.6 on a range of .
A minor release upgrade is a change from an earlier release of MariaDB Enterprise Server 10.6 to a later release in the same release series.
For example, it would be a minor release upgrade to upgrade from MariaDB Enterprise Server 10.6.20-16 to MariaDB Enterprise Server 10.6.21-17.
Installing MariaDB with yum/dnf
Complete MariaDB installation guide. Complete setup instructions for Linux, Windows, and macOS with configuration and verification for production use.
On RHEL, CentOS, Fedora, and other similar Linux RPM based distributions, these provide MariaDB packages. These are supported by those distributions. If you have a particular need for a later version than what is in the distribution, then MariaDB provides repositories for them.
Using repositories rather than installing RPM allows for an ease of update when a new release is made. It is highly recommended to install the relevant from MariaDB's
repository using or . Centos 7 still uses yum, most others use dnf, and SUSE/openSUSE use zypper.
This page walks you through the simple installation steps using dnf and yum
~> brew info mariadb
==> mariadb: stable 12.1.2 (bottled)
Drop-in replacement for MySQL
https://mariadb.org/
...
To restart mariadb after an upgrade:
brew services restart mariadb
Or, if you don't want/need a background service you can just run:
/opt/homebrew/opt/mariadb/bin/mariadbd-safe --datadir\=/opt/homebrew/var/mysql
==> Analytics
install: 6,319 (30 days), 12,735 (90 days), 62,444 (365 days)
install-on-request: 6,291 (30 days), 12,670 (90 days), 62,137 (365 days)
build-error: 8 (30 days)
~> which mariadb
/opt/homebrew/bin/mariadb # in the next command, use this location to cd to
~> cd /opt/homebrew/bin/; ls -1 maria*
mariabackup
mariadb
mariadb-access
...
mariadbd
mariadbd-multi
mariadbd-safe
mariadbd-safe-helper
~> mariadb nation
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 14
Server version: 12.1.2-MariaDB Homebrew
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [nation]> SHOW TABLES;
+-------------------+
| Tables_in_nation |
+-------------------+
| continents |
| countries |
| country_languages |
| country_stats |
| guests |
| languages |
| region_areas |
| regions |
| vips |
+-------------------+
9 rows in set (0.001 sec)
deb http://ftp.debian.org/debian buster main contrib
deb http://security.debian.org buster/updates main contrib
deb-src http://ftp.debian.org/debian buster main contrib
deb-src http://security.debian.org buster/updates main contrib