Ubuntu: Management node (MGM) installation and configuration

Source: Internet
Author: User

The MySQL version in Ubuntu 8.04 is 5.0.51a. In the package mysql-server-5.0, not only the Cluster Server Manager (ndb_mgmd) is carried, but also the cluster management client (ndb_mgm ). The client ndb_mgm can be used to display the cluster status, so that you can understand the working status of the cluster.

In this section, we install and configure the mysql-mgm.mytest.com (192.168.1.10 ).

Install MySQL

On the mysql-mgm.mytest.com server, install the MySQL server:

$ Sudo apt-get update install mysql-server

During installation, the installer requires you to set the MySQL root Password. Set and remember the password.

Configure ndb_mgmd.cnf

Now let's create a MySQL cluster configuration file. The file path is/etc/mysql/ndb_mgmd.cnf:

$ Sudo nano/etc/mysql/ndb_mgmd.cnf

The warning file name must be ndb_mgmd.cnf; otherwise, the service cannot be started.

Enter the following content:

[Ndbd default]

NoOfReplicas = 2

[Mysqld default]

[NDB_MGMD DEFAULT]

[Tcp default]

[NDB_MGMD] # management Node

HostName = 192.168.1.10 # IP address of the Local Machine (Management node)

[NDBD] # Storage Node 1

HostName = 192.168.1.13

DataDir =/var/lib/mysql-cluster

BackupDataDir =/var/lib/mysql-cluster/backup

[NDBD] # Storage Node 2

HostName = 192.168.1.14

DataDir =/var/lib/mysql-cluster

BackupDataDir =/var/lib/mysql-cluster/backup

# If there are several storage nodes, write a few lines [MYSQLD]

[MYSQLD]

[MYSQLD]

After saving the file, you can start the mgm service of MySQL:

$ Sudo/etc/init. d/mysql-ndb-mgm start

To stop a MySQL cluster, stop the mgm service.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.