MariaDB

MariaDB Article description::is an enhanced, drop-in [[MySQL replacement.]]

In Gentoo, is the default package for items that depend on.

Emerge
Install :

OpenRC
To have MariaDB started automatically at boot, add it to the default runlevel:

If MariaDB is configured, start the service:

systemd

 * With MariaDB < 10.1


 * With MariaDB >= 10.1.8

Preliminary configuration
Gentoo MariaDB package maintainers will help you set up MariaDB through the configuration option in the ebuild.

The configuration will create a database, set proper permissions, and assist you in creating a secure root password (this is for the MariaDB root account, which is not related to the Linux root account).

In the event MariaDB configuration fails due to 'localhost' as hostname, update the system hostname variable to a name other than 'localhost' in /etc/conf.d/hostname:

Restart the hostname service:

Then, run the configuration command:

In-database configuration
When the database is set up and running, connect to MariaDB using the client application.

Custom options
Beginning with MariaDB 10.2, the configuration file, includes a single directive to include and all files located within. Gentoo includes a file for server settings and one for client settings. Create your own files in this directory and they will be added together in alphabetical order. The base configuration accepts almost all the defaults and only tweaks paths. Tune your server to your liking.

Compiling against libmariadb.so
Beginning with MariaDB 10.2, a new LGPL client library is included.

With MariaDB 10.2.8, the server and client headers were separated. This causes compilation errors in some programs which previously relied on server features.

MYSQL_SERVER_VERSION
One example is MYSQL_SERVER_VERSION. A quick fix can be: #define MYSQL_SERVER_VERSION MARIADB_CLIENT_VERSION_STR Ultimately, MYSQL_SERVER_VERSION should be removed and use the MYSQL_VERSION_ID integer for version identification.
 * 1) if defined MARIADB_CLIENT_VERSION_STR && !defined MYSQL_SERVER_VERSION
 * 1) endif

External resources

 * MariaDB VS MySQL features
 * MariaDB VS MySQL compatibility
 * Moving from MySQL