Download the latest MySQL Cluster sources.
At the time of this writing I’m using MySQL Cluster 7.3.2
// Installing some libraries and java
ubuntu: #apt-get install bison libncurses5-dev libtool g++ gcc make cmake ubuntu: #apt-get install openjdk-7-jdk |
// Extracting mysql source
ubuntu: # tar xvfz mysql-cluster-gpl-7.3.2.tar.gz -C /usr/local/src ubuntu: # chown -R root.root /usr/local/src/mysql-cluster-gpl-7.3.2 ubuntu: # cd /usr/local/src//mysql-cluster-gpl-7.3.2 |
// Configuring MySQL Cluster
ubuntu: /usr/local/src/mysql-cluster-gpl-7.3.2# cmake . |
// Installing MySQL Cluster
ubuntu: /usr/local/src/mysql-cluster-gpl-7.3.2# make clean install |
// Adding mysql user and group; you will need to do this on all machines where MySQL will be installed
ubuntu: /usr/local/mysql# groupadd mysql ubuntu: /usr/local/mysql# useradd -g mysql mysql ubuntu: /usr/local/mysql# chown -R mysql.mysql . |
// Dumping essential data in mysql
ubuntu: /usr/local/mysql# scripts/mysql_install_db --user=mysql Can't find messagefile '/usr/share/mysql/errmsg.sys ubuntu: /usr/local/mysql# cp /usr/local/mysql/share/english/errmsg.sys /usr/share/mysql/errmsg.sys ubuntu: /usr/local/mysql# chown -R root . ubuntu: /usr/local/mysql# chown -R mysql data ubuntu: /usr/local/mysql# mkdir mysql-cluster |
// Copying mysqld daemon file
ubuntu: /usr/local/mysql# cp support-files/mysql.server mysqld |
// Starting MySQL
ubuntu: /usr/local/mysql# ./mysqld start |
// Setting passwords
ubuntu: /usr/local/mysql# bin/mysqladmin -uroot password ‘new-password’ |
// Securing MySQL Cluster installation
ubuntu: /usr/local/mysql# bin/mysql_secure_installation |
// Now you can log into MySQL database
ubuntu: /usr/local/mysql# bin/mysql -uroot -p |
// Stopping MySQL
ubuntu: /usr/local/mysql# ./mysqld stop |
// Creating a compressed MySQL template for the other machines
ubuntu: /usr/local# tar czf mysql.tgz mysql |