3.3.2 安装、配置、运行和访问MySQL Cluster管理器
在Cluster中代理必须安装和运行每个主机上。
1.将下载的tar-ball扩展到一个已知的目录(在本例中我们使用/usr/local/mcm)。
2.复制/usr/local/mcm/etc/mysql-cluster-manager.ini到/home/billy/mcm/并且编辑它:
[mysql-proxy]
plugins=manager
log-file = mysql-manager-agent.log
log-level = message
manager-directory=/home/billy/mcm/
plugins=manager
log-file = mysql-manager-agent.log
log-level = message
manager-directory=/home/billy/mcm/
3.复制许可文件(user.dat 和 license.dat)到安装目录中。
4.运行代理进程
$ /usr/local/mcm/bin/mysql-cluster-manager --defaults-
file=/home/billy/mcm/mysql-cluster-manager.ini&
file=/home/billy/mcm/mysql-cluster-manager.ini&
5.从任何机器(安装MySQL的客户端)访问代理
$ mysql -h 192.168.0.10 -P 1862 -u admin -p --prompt='mcm> '
Enter password: super
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 1.0.1-agent-manager MySQL Cluster Manager
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mcm>
Enter password: super
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 1.0.1-agent-manager MySQL Cluster Manager
Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.
mcm>
每个包含管理的MySQL Cluster节点的物理主机,在重复1到3步骤时候,系统看起来如图8所示。