MinGyoo Jung
MinGyoo Jung

Reputation: 234

Adding MySQL Cluster Sql Nodes Online

I use mysql ndbcluster on 4 data nodes and 4 sql nodes and recently I need to add 4 more sql nodes with no downtime. In Mysql Manual, I found a guide to add data node online but I cant fot found any for sql node.

http://dev.mysql.com/doc/mysql-cluster-excerpt/5.1/en/mysql-cluster-online-add-node.html

Do you have any guide for that?

thanks.

Upvotes: 2

Views: 2794

Answers (2)

Moll
Moll

Reputation: 91

If you don't have a section for this new SQL node in the config.ini already you can do the following:

  1. Add a section for the new SQL node in config.ini file(s).
  2. Restart the Management node process(es) with --initialize or --reload option.
  3. Do a rolling restart to the Data nodes and the current SQL nodes but DO NOT start the new SQL node.
  4. Create a directory in the new SQL node under the datadir for each DB in the cluster and assign the right permission to mysql user.
  5. Finally, start the new SQL node.

If you have a section in the config.ini file(s) for that new SQL node already and is reflected in the cluster you can skip the steps from 1:3 and start from step 4.

Upvotes: 0

Andrew Morgan
Andrew Morgan

Reputation: 570

Adding extra MySQL Servers is very straight-forward.

Assuming that you have already run a mysqld process for every section [mysqld] or [api] section in your config.ini file, add an extra section for each of the new MySQL Servers that you need to add (you might want to include a couple of spares).

To apply the updated configi.ini file, stop each ndb_mgmd process and then restart them with the --initial option (otherwise they will use their cached copy of config data rather than the updated config.ini file).

After the management node(s) is running again, restart each data node:

  • Wait for each data node to return to service before restarting the next (so that there is always one data node in each node group available and so service is not interrupted)
  • Do not start them with the --initial option or else you will wipe out your data

Once all of the data nodes are running again just start up you new mysqld instances.

If you use MySQL Cluster Manager (download from edelivery.oracle.com) then it's even simpler

Andrew.

Upvotes: 3

Related Questions