MySQL cluster is a high-utility, high-redundancy version of MySQL suitable for distributed computing environments. Cluster Chinese is the meaning of "cluster". It employs the NDB Cluster storage engine, allowing multiple MySQL servers to run in 1 Cluster . This clustering technique was preceded by a similar technique in all major databases, and a simple statement was that database virtualization ensured high availability, such as Oracle's RAC.
The architecture of a cluster is divided into management nodes (managing to view the entire cluster), storage nodes (data that holds the cluster), and SQL nodes (providing data access to the application tier).
Readers can download the specified MySQL cluster installation package from the MySQL website according to the operating system of their production machine. Note: You will need to uninstall MySQL from the server before you install it, otherwise you won't be able to start the cluster properly.
There are a few issues that you will encounter in installing and deploying the cluster:
1. During cluster installation, the directories for the storage and SQL nodes need to be assigned permissions to the MySQL user, not root.
2. File configuration for the management node, SQL node, data node in the deployment cluster
3. When starting the management node, if an error is encountered may be/usr/mysql-cluster not given to MySQL permissions, change can be.
4. The Data node service starts to see a pointer to the Management Server IP address, and the specified number of nodes is indicated as normal.
the 5.SQL service needs to be started or the database cannot be entered. The start database command in MySQL cluster is:mysqld_safe--defaults-file=/etc/my.cnf &. The MySQL initial password given by the cluster is randomly generated and can be changed into the database.
6. All the additions and deletions to the data will be synchronized to the other nodes in real time after all nodes have been started normally. If you encounter data that is out of sync and does not match, you need to restart after the Cluster service is stopped. The order is: first stop the Management node, the NDBD node will automatically shut down, and then stop the SQL process, you can manually kill.
Some common questions about building MySQL high-availability clusters