MySQL Cluster Sandbox - pre-defined packages
MySQL Cluster Sandbox let's you get going within seconds. The packages contains a number of scripts to install, setup, and run MySQL CLuster and are intended for localhost installation only. They can be used for evaluation and development, as well as getting familiar with MySQL Cluster. Disk intensive, i.e write intensive apps, should use a real distributed setup. Otherwise there is a big chance that you will overload the disk subsystem. The data nodes will complain about "Redo logs overloaded" or something about "Redobuffer". If you want to have a real distributed setup, please use the configurator!
The packages comes with:
- 1 management server
- 2 data nodes
- 2 mysql servers
All processes are running on localhost! Please read the README to see the directory structure of the packages.
You can install the packages as any user! It will be self-contained in one single directory! You can also chose ports so that you can test with several versions, or also setup replication between two clusters on localhost!
Choose if you want to use the Pre-packaged configurations (fixed ports) or create a Custom configuration where you set the ports yourself.
Whatever you chose the scripts can automatically download and compile the latest source code release, or you can download the latest binary release from dev.mysql.com/downloads/cluster
mac osx users
You need to copy the macos.sh script to themysqlcluster-XXX/cluster/scripts/ catalog and the run it as:sh macos.shbefore you run any other script.
This will convert all the LD_LIBRARY_PATH to DYLD_LIBRARY_PATH and also use tar xvfz instead of 'zcat' which does not work in MAC OSX.
You also need to download apple xcode and wget.
Try out the Custom sandbox and get a sandbox for MySQL Cluster 7.1
Pre-packaged
You can choose from three types of Sandboxes (no replication, master cluster and slave cluster) and also thee different sizes:
- Small - suitable for a computer with 1-2GB of RAM. 2GB is required if fully loaded up with data.
- Medium - suitable for a computer with ~4GB of RAM. 4GB is required if fully loaded up with data.
- Large - suitable for a computer with ~8GB of RAM.
The following ports are used in the packages (see below for details): 1186 and 1187 (management server), 3306, 3307, 3310, 3311 (mysql servers).
Small
| package | ports used | download | extra info | cluster version |
| no replication | 1186, 3306, 3307 | mysqlcluster-63-small.tar.gz | DataMemory=256M | mysql-cluster-gpl-6.3.27 |
| master cluster | 1186, 3306, 3307 | mysqlcluster-63-small-master.tar.gz | DataMemory=256M | mysql-cluster-gpl-6.3.27 |
| slave cluster | 1187, 3310, 3311 | mysqlcluster-63-small-slave.tar.gz | DataMemory=256M | mysql-cluster-gpl-6.3.27 |
| no replication | 1186, 3306, 3307 | mysqlcluster-70-small.tar.gz | DataMemory=256M | mysql-cluster-gpl-7.0.9b |
| master cluster | 1186, 3306, 3307 | mysqlcluster-70-small-master.tar.gz | DataMemory=256M | mysql-cluster-gpl-7.0.9b |
| slave cluster | 1187, 3310, 3311 | mysqlcluster-70-small-slave.tar.gz | DataMemory=256M | mysql-cluster-gpl-7.0.9b |
Medium
| package | ports used | download | extra info | cluster version |
| no replication | 1186, 3306, 3307 | mysqlcluster-63-medium.tar.gz | DataMemory=1024M | mysql-cluster-gpl-6.3.27 |
| master cluster | 1186, 3306, 3307 | mysqlcluster-63-medium-master.tar.gz | DataMemory=1024M | mysql-cluster-gpl-6.3.27 |
| slave cluster | 1187, 3310, 3311 | mysqlcluster-63-medium-slave.tar.gz | DataMemory=1024M | mysql-cluster-gpl-6.3.27 |
| no replication | 1186, 3306, 3307 | mysqlcluster-70-medium.tar.gz | DataMemory=1024M | mysql-cluster-gpl-7.0.9b |
| master cluster | 1186, 3306, 3307 | mysqlcluster-70-medium-master.tar.gz | DataMemory=1024M | mysql-cluster-gpl-7.0.9b |
| slave cluster | 1187, 3310, 3311 | mysqlcluster-70-medium-slave.tar.gz | DataMemory=1024M | mysql-cluster-gpl-7.0.9b |
Large
| package | ports used | download | extra info | cluster version |
| no replication | 1186, 3306, 3307 | mysqlcluster-63-large.tar.gz | DataMemory=2560M | mysql-cluster-gpl-6.3.27 |
| master cluster | 1186, 3306, 3307 | mysqlcluster-63-large-master.tar.gz | DataMemory=2560M | mysql-cluster-gpl-6.3.27 |
| slave cluster | 1187, 3310, 3311 | mysqlcluster-63-large-slave.tar.gz | DataMemory=2560M | mysql-cluster-gpl-6.3.27 |
| no replication | 1186, 3306, 3307 | mysqlcluster-70-large.tar.gz | DataMemory=2560M | mysql-cluster-gpl-7.0.9b |
| master cluster | 1186, 3306, 3307 | mysqlcluster-70-large-master.tar.gz | DataMemory=2560M | mysql-cluster-gpl-7.0.9b |
| slave cluster | 1187, 3310, 3311 | mysqlcluster-70-large-slave.tar.gz | DataMemory=2560M | mysql-cluster-gpl-7.0.9b |
Installation - Pre-packaged and Custom
- Download the package you want and unpack it. E.g something like:
- tar xvfz mysqlcluster-63-<type>.tar.gz
- cd mysqlcluster-63-<type>
- Continue from either "To build from source" (MySQL makes source releases for frequently than binary builds) or "Using a tar.gz distro"
To build from source
Personally I recommend building from source since you get the latest version of MySQL Cluster. I don't update the scripts with a new Cluster version the same day as it is released, but wait usually one week so that potential regression problems have been spotted by someone else.
You must have installed:
- gcc and g++ e.g,
apt-get install gcc g++oryum install gcc.x86_64 - wget e.g,
apt-get install wgetoryum install wget.x86_64 - ncurses-dev e.g,
apt-get install libncurses5-devoryum install ncurses-devel.x86_64
Then run the following four scripts
Using a tar.gz distro
After this you can the use the other scripts:
mysql -S /tmp/mysql.sock.3306 does also work, unless you use a slave sandbox, then mysql -S /tmp/mysql.sock.3310mysql -S /tmp/mysql.sock.3306 does also work, unless you use a slave sandbox, then mysql -S /tmp/mysql.sock.3311There are also scripts to stop the cluster, start and stop individual nodes. E.g:
Common issues
Error loading shared libraries - LD_LIBRARY_PATH not set
If you get the something like the following error message when starting the mysql client (or any other mysql tool):/usr/local/mysql/mysql/bin/mysql: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directoryThen you need to set the
LD_LIBRARY_PATH
E.g:
export LD_LIBRARY_PATH=/usr/local/mysql/mysql/lib/mysql:$LD_LIBRARY_PATH
or
export LD_LIBRARY_PATH=/usr/local/mysql/lib/mysql:$LD_LIBRARY_PATH
or
export LD_LIBRARY_PATH=/usr/local/mysql/mysql/lib/:$LD_LIBRARY_PATH
or
export LD_LIBRARY_PATH=/usr/local/mysql/lib/:$LD_LIBRARY_PATH
are common LD_LIBRARY_PATHSs[MgmSrvr] ERROR -- Error opening '.../config.ini'
If you get the following error:[MgmSrvr] ERROR -- Error opening '/.../mysqlcluster-70/scripts/../config/config.ini', error: 2, No such file or directoryThen you have forgot to run:
sh bootstrap.sh
Make sure you have run the download, dist and bootstrap scripts.
Support
Let us know if you have issues with the scripts by mailing support at severalnines dot com