MySQL Cluster Manager 1.4用户手册-A4
MySQL Cluster Manager 1.4用户手册
MySQL Cluster Manager(MCM)是一种管理多个MySQL Cluster实例的工具。本手册介绍了如何安装、配置和使用MySQL Cluster Manager。
安装
MySQL Cluster Manager可以从MySQL官网的下载中心下载。根据操作系统选择适用的版本,下载后运行安装程序即可。
配置
在使用MySQL Cluster Manager之前,需要配置MCM Agent和MySQL Cluster实例的连接信息。编辑mcmd.conf文件,添加以下属性:
[mcmd]
bind_address=192.168.1.100
default_cluster=mycluster
# 指定MCM Agent的监听地址,默认为127.0.0.1。
# 指定默认的MySQL Cluster实例名称。
[mycluster]
cluster_address=192.168.1.101
user=myuser
password=mypassword
# 指定MySQL Cluster实例的连接信息。
将MCM Agent和MySQL Cluster实例的节点都添加到hosts文件中。在Linux系统中,hosts文件在/etc目录下。添加后如下图所示:
192.168.1.100 mcm-agent
192.168.1.101 mcm-mysql-ndb01
192.168.1.102 mcm-mysql-ndb02
192.168.1.103 mcm-mysql-ndb03
# 将MCM Agent和MySQL Cluster实例的节点都添加到hosts文件中。
使用
在配置完成后,可通过以下命令启动MCM Agent:
shell> mcmd &
此时,可以使用mcm命令进行管理。
显示MySQL Cluster实例状态:
shell> mcm cluster list
启动MySQL Cluster实例:
shell> mcm cluster start mycluster
停止MySQL Cluster实例:
shell> mcm cluster stop mycluster
启动 MySQL Cluster Manager Web Service:
shell> mcm web start
此时可以通过Web界面访问MySQL Cluster Manager的管理功能。
总结
本文介绍了MySQL Cluster Manager的安装、配置和使用方法,使读者可以更加方便地管理多个MySQL Cluster实例。
