Article Title: ubuntu system: test the cluster connection status. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
1. Test the cluster connection status
First, we go back to the management node (mysql-mgm.mtest.com. On this server, run the following command:
$ Ndb_mgm
After the command is executed, the MGM client interface is displayed, and the mgm prompt is displayed:
-- NDB Cluster -- Management Client --
Ndb_mgm>
At this prompt, enter the show command to view the current connection status:
Ndb_mgm> show
Normally, the following content should be displayed:
From the above content, we can see that both the NDB nodes 192.168.1.13 and 192.168.1.14 have been connected to the management node. Configuration successful!
Run the quit or exit command to exit the MGM client:
Ndb_mgm> quit
Now, let's see if the cluster is normal in terms of data storage. We will perform data operations on the two storage nodes respectively.
1. Data synchronization test
First, we create a database on the node mysql-data1.mytest.com and insert a row of data.
$ Mysql-u root-p
After entering the password, the command line interface of the MySQL client is displayed. On this page, enter the following command:
The preceding command creates a database named clustertest and creates a table named testtable in the database. The table type is NDBCLUSTER, that is, NDBCLUSTER is used as the database engine. This table has a field called Count. We also inserted a piece of data into the table, with the value of the Count field being 1.
[1] [2] [3] [4] Next page