Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Fixed
-
10.1.14
-
None
-
linux
Description
Starting a Galera cluster with mysqld_multi currently requires to manually add (and later remove) --wsrep-new-cluster in the config block of the mysqld instance that is supposed to become the first cluster node.
I suggest to add a --new-cluster option to mysqld_multi that will add --wsrep-new-cluster to the mysqld command line of each server process started by mysqld_multi --new-cluster start ...
Attachments
Issue Links
- links to
Suggested patch:
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index e3f8e50..19c94b1 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -47,6 +47,7 @@ $opt_help = 0;
$opt_log = undef();
$opt_mysqladmin = "@bindir@/mysqladmin";
$opt_mysqld = "@libexecdir@/mysqld";
+$opt_new_cluster = 0;
$opt_no_log = 0;
$opt_password = undef();
$opt_tcp_ip = 0;
@@ -125,7 +126,7 @@ sub main
# We've already handled --no-defaults, --defaults-file, etc.
if (!GetOptions("help", "example", "version", "mysqld=s", "mysqladmin=s",
- "user=s", "password=s", "log=s", "no-log",
+ "user=s", "password=s", "log=s", "new-cluster", "no-log",
"tcp-ip", "silent", "verbose"))
{
$flag_exit= 1;
@@ -378,6 +379,9 @@ sub start_mysqlds()
$info_sent= 1;
}
$com.= $tmp;
+ if ($opt_new_cluster) {
+ $com.= " --wsrep-new-cluster";
+ }
$com.= " >> $opt_log 2>&1" if (!$opt_no_log);
$com.= " &";
if (!$mysqld_found)