読者です 読者をやめる 読者になる 読者になる

systemd を利用した mariadb galera cluster first node の起動の仕方

メモ さーばー

Getting Started with MariaDB Galera Cluster - MariaDB Knowledge Baseには、

On newer operating system using systemd, boostrap is done using the script galera_new_cluster.

と書いてある。

cat /usr/bin/galera_new_cluster
#!/bin/sh

# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.

VERSION="10.1.14"
COMPILATION_COMMENT="MariaDB Server"

systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster' && \
    systemctl start ${1:-mariadb}

systemctl set-environment _WSREP_NEW_CLUSTER=''