- IT IS ONLY POSSIBLE TO UPGRADE FROM 6.3 to at least 7.0.6!
- I would recommend to upgrade from 6.3.x to 6.3.latest before doing the upgrade. If the upgrade does not work then and you have a good config.ini , you have probably hit a bug.
- You cannot upgrade from 6.3 to the multi-threaded binary of 7.0.6 in one go.
You have to upgrade from 'ndbd' (6.3) --> 'ndbd' (7.0.6)
Then you can do 'ndbd' (7.0.6) --> 'ndbmtd' (7.0.6)
As usual when upgrading (version, configuration variables etc) you must do a rolling restart and restart:
- ndb_mgmd (management servers)
- ndbd (data nodes)
- mysqld (mysql servers / direct api applications)
Copy the binaries to each host (i.e., replace existing 6.3 binaries) in the cluster.
Upgrading the Management Server(s)
In 6.3 you started the management server as (e.g):
ndb_mgmd -f /etc/mysql/config.ini
In 7.0.6 you have to start them slightly differently, but first you have to stop both (if you have two, but you really should) management servers (because of this bug):killall ndb_mgmd
And.. I never use the management client to start/stop nodes, because I think it works sometimes which makes it difficult to file bugs on, and hard to rely on.When you have killed both you can then do:
ndb_mgmd -f /etc/mysql/config.ini --configdir=/etc/mysql --reload
The management server in 7.0.6 writes a binary config file in --configdir, which is a configuration cache. --reload will reload the config.ini and update that cache.Upgrading the Data Nodes
Restart the data nodes on each machine one at a time:
killall ndbd
ndbd --ndb-nodeid=X --ndb-connectstring="managementhostA;managementhostB"
ndb_waiter --ndb-connectstring="managementhostA;managementhostB"
# when ndb_waiter exits, you can restart the next data node.
Upgrading the MySQL Servers/Direct APIs
Stop and start the mysql servers:
killall mysqld #(or mysqladmin shutdown , both sends signal 15)
mysqld_safe --defaults-file=/etc/config/my.cnf
Upgrading to multithreaded 7.0.6 data nodesWhen the Cluster has been restarted with 7.0.6 you can upgrade to multithreaded data nodes.
The binary for the multithreaded data node is called 'ndbmtd'.
You need to set in config.ini (on both management servers):
[ndbd default]
..
MaxNoOfExecutionThreads=#number of cores you have (up to 8)
..
Then stop both management serverskillall ndb_mgmd
When you have killed both you can then start both by doing:ndb_mgmd -f /etc/mysql/config.ini --configdir=/etc/mysql --reload
and then restart the data nodes one at a time:Using Severalnines Configuratorkillall ndbd
ndbmtd --ndb-nodeid=X --ndb-connectstring="managementhostA;managementhostB"
ndb_waiter --ndb-connectstring="managementhostA;managementhostB"
# when ndb_waiter exits, you can restart the next data node.
If you have a Severalnines installation of MySQL Cluster 6.3, then you can upgrade in the following way:
- Make sure you have have the files:
mysqlcluster-xy/cluster/scripts/install/.s9s/hostnamesmysqlcluster-xy/cluster/scripts/install/.s9s/ndb_hostnames
mysqlcluster-xy/cluster/scripts/install/.s9s/mysql_hostnames
mysqlcluster-xy/cluster/scripts/install/.s9s/mgm_hostnames
Otherwise you have a too old version of the Configurator package and you need to generate a new one. - Generate a new Config using 7.0.6 with the same nodes, data memory, data dirs etc.
Select "no MT" when asked for "Number of cores:" - Install the package
Let's assume you have 6.3 in:
Install mysqlcluster-70.tar.gz/root/mysqlcluster-63/
Copy the .s9s catalog from 6.3 so you get the hostnamescd /root/
tar xvfz mysqlcluster-70.tar.gz
cd mysqlcluster-70/cluster/scripts/installcp -r /root/mysqlcluster-63/cluster/scripts/install/.s9s .
- Download the binary or build the source:
or./download-binary.sh
./download-and-compile.sh
- Install and perform a rolling restart
./install-cluster.sh
cd ..
./rolling-restart.sh - Change from ndbd --> ndbmtd
Locate MaxNoOfExecutionThreads and, un-comment it if needed and set it to as many cores as you have:vi ../config/config.ini
Then change in the scripts from ndbd -> ndbmtd[ndbd default]
...
MaxNoOfExecutionThreads=8
...
Important! Don' leave out 'libexec' above!sed -i 's#libexec/ndbd#libexec/ndbmtd#g' *.sh
And do a rolling restart:./rolling-restart.sh
- Luckily it is much easier to upgrade from e.g 7.0.6 to 7.0.x and I will show when 7.0.7 is out how to do that in two lines.