I am setting up a MariaDB Galera cluster along several servers so that they can have access to synchronized data. However, one of the servers is hosting an independent WordPress website which needs its own database, which should not be part of the cluster.
All servers are running Ubuntu (20.04 or 22.04) and MariaDB 10.6.
How can I separate the clustered and stand-alone databases on the same server? Can MariaDB handle this within its settings, or should there be another instance running (and how?)
There is a systemd templated services that can operate independently from the Galera instance.
By default, the templated (multi-instance) services are will execute
mariadbdwith--defaults-group-suffix=.%I.This means in your configuration file (
/etc/mysql/mariadb.conf.d/wordpress.cnf) there needs to be a sections like:/etc/tmpfiles.d/mariadb.wordpress
This is just to be 100% about the temporary file isolation.
The
.wordpresssections apply to the wordpress instance and won't be read by the Galera instance. However global setting will be read by the wordpress instance hence disablingwsrep_on=off.To install a datadir:
Then to enable and start the service:
ref: MariaDB KB systemd, or look inside the
/lib/systemd/system/[email protected]file.