MySQL, the most popular Open Source SQL database management system, is developed, distributed, and supported by Oracle Corporation.
This tutorial shows you how to deploy a multi-node MySQL cluster on Paas.
2 or More Virtual Machine With this spesification :
- 4 vCPU
- 2 GB RAM
- Ubuntu 20.04 or Ubuntu 18.04
- Atleast 150 GB of Storage
Step 1 Login to your Paas.id Account
Step 2 Add VM machines to serve as MySQL cluster node
After logging in you can start to add your Virtual Machine to create a MySQL cluster. First navigate to Services, then click on New Cluster Database.
To deploy the MySQL cluster, pick MySQL as a platform and you can fill in the database name and description as you want. Then click next.
After that you can add your VM by clicking on Add Node Database, filling out all the information needed.
When creating a MySQL cluster node you also need to define the node as My SQL Node or Data Node. If you turn on My SQL Node you can access the database through this node, an MySQL node is a traditional MySQL server that uses the
NDBCLUSTER storage engine. If you turn on Data Node then you can't access the database through this node because this node purposes is to store data within the cluster. You can also turn on both My SQL Node and Data Node which mean you can store and access the database through this node. reference
I will be using 2 nodes in this tutorial, which 1 node of My SQL Node and 1 Data Node.
For the second node you can just turn the Data Node
By default the first node you add is Master Node but you can change it by clicking on the three dots next to the node name. After that you can click next.
Click create to create node.
Then click deploy
Wait until the status of the cluster is installed.
Accessing the MySQL Cluster
After the installation status changes to installed, you can access the MySQL Cluster. First, open the Cluster services on the paas dashboard.
Then click on the Database Credential, you can see the credentials of the cluster. You get the credential of the node where My SQL Node is activated. For this example tutorial, you will not get the credentials of mysql-data-node because the MySQL Node is false.
You can access the clusters with one of the public IP address of your Virtual Machine, using Database Management Application such as Beekeper Studio or DBeaver.