您现在的位置:中国下载站学院中心数 据 库Mssql教程Mssql使用技巧 → 文章列表

MySQL群集双机模拟

作者:佚名  来源:不详  发布时间:2007-4-14 12:20:40   

减小字体 增大字体

 
 
  硬件配置

  普通PC server * 2 (最小集群环境需要4台服务器

  模拟环境

  red hat linux9 for x86 (or red hat AS 2以上版本),glibc-2.2, static, gcc

  MySQL版本4.1.12 binares

  mysql-max binary版本目前只支持linux、max os x和solaris

  本方案不涉及从源代码编译安装

  主机 IP地址 用途

  ndb1_mgmd_sqld 1192.168.1.100 Ndb node1+mgmd node1+sqld node1

  ndb2_sqld2 192.168.1.200 Ndb node2+sqld node2

  Mgmd:management server

  sqld:mysql server

  ndb:storaged node (share-nothing,base in memory)

  安装

  从http://dev.mysql.com/downloads/mysql/4.1.html下载mysql-max-4.1.12-pc-linux-gnu-i686.tar.gz到/var/tmp

  Storage and SQL Node Installation

  在两台主机上执行如下过程

  shell>groupadd mysql

  shell>useradd -g mysql mysql

  shell>tar zxfv mysql-max-4.1.12-pc-linux-gnu-i686.tar.gz

  shell>cp -vr mysql-max-4.1.12-pc-linux-gnu-i686 /usr/local/mysql-max-4.1.12-pc-linux-gnu-i686

  shell>cd /usr/local

  shell>ln -s mysql-max-4.1.12-pc-linux-gnu-i686 mysql

  shell>cd mysql;scripts/mysql_install_db –user=mysql

  shell>chown -R root .;chown -R mysql data;chgrp -R mysql .

  shell>cp support-files/mysql.server /etc/rc.d/init.d/

  shell>chmod +x /etc/rc.d/init.d/mysql.server

  shell>chkconfig --add mysql.server

  shell>chkconfig –level 3 mysql.server off

  Management Node Installation

  在主机ndb1_mgmd_sqld1上执行如下过程

  shell>cd /var/tmp

  shell>tar -zxvf mysql-max-4.1.12a-pc-linux-gnu-i686.tar.gz /usr/local/bin '*/bin/ndb_mgm*'

  Configuration

  Configuring the Storage and SQL Nodes

  在两台主机上执行如下过程:

  shell>vi /etc/my.cnf

  [MYSQLD]             # Options for mysqld process:

  ndbcluster           # run NDB engine

  ndb-connectstring=192.168.1.100  # location of MGM node

  [MYSQL_CLUSTER]         # Options for ndbd process:

转贴于:中国QQ站

  • 上一篇文章:MySQL备份和恢复
  • 下一篇文章:MySQL损坏数据的恢复
  • 阅读统计:[]
  • 中国QQ站】【设为主页】【收藏本页】【打印本文】【回到顶部】【关闭此页

    相关文章
    文章评论(评论内容只代表网友观点,与本站立场无关!)

    用户名: 查看更多评论

    分 值:100分 85分 70分 55分 40分 25分 10分 0分

    内 容:

             (注“”为必填内容。) 验证码: 验证码,看不清楚?请点击刷新验证码


    设为首页 - 关于我们 - 广告服务 - 网站地图 - 加入收藏 - 网站声明 - 网站帮助 - 友情链接