MySQL Cluster安装配置

php中文网
发布: 2016-06-07 17:30:46
原创
2735人浏览过

环境CentOS6.4_64网络配置192.168.10.167 os-14192.168.10.166 os-13192.168.10.151 os-1192.168.10.152 os-2192.168.10.153 os-

环境
centos6.4_64
网络配置
192.168.10.167 os-14
192.168.10.166 os-13
192.168.10.151 os-1
192.168.10.152 os-2
192.168.10.153 os-3
192.168.10.154 os-4
192.168.10.155 os-5
192.168.10.156 os-6
架构和资源分配
192.168.10.151=====集群管理(cmgm)
###################################
192.168.10.154 os-4||
192.168.10.152 os-2||===mysqlserver(sql)
192.168.10.153 os-3||
###################################
192.168.10.155 os-5  ||
192.168.10.156 os-6  ||===storage(ndb)
192.168.10.167 os-14 ||
192.168.10.166 os-13 ||

error:
file /usr/share/mysql/ukrainian/errmsg.sys from install of MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64 conflicts with file from package mysql-libs-5.1.66-2.el6_3.x86_64
解决方法:
yum -y remove mysql-libs-5.1.66-2.el6_3.x86_64

error:
[root@os-13 ~]# cd /usr/src/mysql/ && rpm -ivh /usr/src/mysql/MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64.rpm
error: Failed dependencies:
    libaio.so.1()(64bit) is needed by MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64
    libaio.so.1(LIBAIO_0.1)(64bit) is needed by MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64
    libaio.so.1(LIBAIO_0.4)(64bit) is needed by MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64
解决方法:
yum install libaio

error:
[root@os-14 mysql]#  rpm -ivh /usr/src/mysql/MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64.rpm
error: Failed dependencies:
    /usr/bin/perl is needed by MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64
解决方法:
yum -y install perl

开始安装(每个节点)
[root@os-1 mysql]# rpm -ivh MySQL-Cluster-server-gpl-7.2.12-1.rhel5.x86_64.rpm
Preparing...                ########################################### [100%]
  1:MySQL-Cluster-server-gp########################################### [100%]
[root@os-1 MySQLCluster]# mkdir /home/mysql && chown -R mysql.mysql /home/mysql
[root@os-1 MySQLCluster]# vi mysqlcluster.ini
[ndbd default]
NoOfReplicas=2
DataMemory=80M
IndexMemory=18M

[tcp default]
portnumber=2202

[ndb_mgmd]
hostname=192.168.10.151
datadir=/home/mysql

[ndbd]
hostname=192.168.10.155
datadir=/home/mysql

[ndbd]
hostname=192.168.10.156
datadir=/home/mysql

[ndbd]
hostname=192.168.10.166
datadir=/home/mysql

[ndbd]
hostname=192.168.10.167
datadir=/home/mysql

[mysqld]
hostname=192.168.10.153

[mysqld]
hostname=192.168.10.152

[mysqld]
hostname=192.168.10.154

配置NDBD存储节点和sql节点
[root@os-2 mysql]# vi /etc/my.cnf
[client]
socket=/tmp/mysql.sock

[mysqld]
ndbcluster
datadir=/home/mysql
socket=/tmp/mysql.sock
ndb-connectstring=192.168.10.151
old_passwords=1

某地板超炫企业网站1.1
某地板超炫企业网站1.1

1、演示:以截图为准 2、程序说明 程序试用后台:http://你的域名/admin/login.asp 后台登陆帐号:admin 密码:admin123 说明: 这个是基于asp+access的企业网站源码,数据库已设有有防下载,网站更安全 要修改网站,自定义你自己要的页面,和美化页面都是你自己完成,网站源码程序完整,后台功能强大。 调试运行环境:要安装IIS服务器(IIS的安装和配置,安装好

某地板超炫企业网站1.1 0
查看详情 某地板超炫企业网站1.1

[mysql_cluster]
ndb-connectstring=192.168.10.151

在每一个数据节点NDBD和SQL节点的机器上执行如下步骤:
scripts/mysql_install_db --user=mysql --datadir=/home/mysql
例子:
[root@os-2 mysql]# mysql_install_db --user=mysql --datadir=/home/mysql
Installing MySQL system tables...
OK
Filling help tables...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'
/usr/bin/mysqladmin -u root -h os-2 password 'new-password'

Alternatively you can run:
/usr/bin/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/bin/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems with the /usr/bin/mysqlbug script!

启动Cluster
注意启动顺序:首先是管理节点,然后是NDBD节点,,最后是SQL节点。

启动CMGM
[root@os-1 mysql-cluster]# ndb_mgmd -f /etc/MySQLCluster/mysqlcluster.ini
MySQL Cluster Management Server mysql-5.5.30 ndb-7.2.12
[root@os-1 mysql-cluster]# ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]    4 node(s)
id=2 (not connected, accepting connect from 192.168.10.155)
id=3 (not connected, accepting connect from 192.168.10.156)
id=4 (not connected, accepting connect from 192.168.10.166)
id=5 (not connected, accepting connect from 192.168.10.167)

[ndb_mgmd(MGM)]    1 node(s)
id=1    @192.168.10.151  (mysql-5.5.30 ndb-7.2.12)

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号