codership / mysql-wsrep

wsrep API patch for MySQL server
Other
65 stars 34 forks source link

Debian 9 with systemd and Galera 5.7 multi-instance bootstrap. #345

Open ofigueroa opened 6 years ago

ofigueroa commented 6 years ago

To bootstrap the fisrt Galera node as indicates in the documentation: http://galeracluster.com/documentation-webpages/startingcluster.html#starting-the-first-cluster-node

"For systems that use systemd and Galera Cluser 5.7, use the dedicated mysqld_bootstrap script"

The script starts the 'mysql' instance only and i think that a good enhacement could be add support to bootstrap any instance that exists in the config file.

Ex:

Config file

[msyqld]
bind-address = 127.0.0.1
port = 3306
log-error= /var/log/mysql/error.log

[mysqld@node1]
bind-adress = 127.0.0.1
port = 3307
log-error= /var/log/mysql/error-node1.log

Bootstrap command.

/usr/bin/mysqld_bootstrap - To bootstrap default mysqld instance
/usr/bin/mysqld_bootstrap mysql@node1 - To bootstrap node1 instance.

In this scenario systemd will use mysql.service or mysql@.service depending of the startup