diff options
Diffstat (limited to 'ndb/bin/mysqlclusterd')
-rwxr-xr-x | ndb/bin/mysqlclusterd | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ndb/bin/mysqlclusterd b/ndb/bin/mysqlclusterd new file mode 100755 index 00000000000..3b4deb3ed48 --- /dev/null +++ b/ndb/bin/mysqlclusterd @@ -0,0 +1,34 @@ +#!/bin/sh + +# configurable parameters +MYSQLCLUSTER_PORT_BASE="22" +# end configurable parameters + +if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP" ]; then + echo "MYSQLCLUSTER_TOP not set or directory does not exist" + exit 1 +fi +if [ -z "$MYSQLCLUSTER_TOP" -o ! -d "$MYSQLCLUSTER_TOP/ndb" ]; then + echo "$MYSQLCLUSTER_TOP/ndb directory does not exist" + exit 1 +fi + +if test "$1" = "ndb_started" +then + shift + mgmt_host=$1 + shift + mgmt_port=$1 + shift + if [ -z "$mgmt_host" -o -z "$mgmt_port" ]; then + echo "syntax: ndb_started hostname port" + exit 1 + fi + NDB_CONNECTSTRING="host=$mgmt_host:$mgmt_port;nodeid=11" + echo using NDB_CONNECTSTRING=$NDB_CONNECTSTRING +else + NDB_CONNECTSTRING="host=localhost:"$MYSQLCLUSTER_PORT_BASE"00;nodeid=11" +fi +export NDB_CONNECTSTRING + +mysqld --default-table-type=ndbcluster --basedir=$MYSQLCLUSTER_TOP --datadir=$MYSQLCLUSTER_TOP/data --socket=$MYSQLCLUSTER_TOP/data/mysqlcluster.sock $* |