文章分类 | 推荐文章 | 最新文章 | 热点文章 | 最新软件 | 精品软件 | 下载排行 | 推荐下载 | 免费看大片 | WPS | 杀毒软件
清风网络
首 页 软件下载 网络学院 数码学院
QQ 电脑入门 游戏 操作系统 图形处理 办公软件 媒体动画 精文荟萃 工具软件 网络编程 程序开发 网络技术 认证考试 网站建设 文章专栏
当前位置:清风网络学院网络编程MYSQLHow To Set Up A Load-Balanced MySQL Cluster - Part 7
精品推荐
特别推荐
·MySQL数据库简介
·安全的配置和应用MySQL数据库
·修改MySQL的默认密码
·初学MYSQL应知道:Mysql参数优化
·数据库安全应用 使用MySQL的23个注意事项
·入门:MYSQL基础
·轻松描述Windows上安装多个Mysql的步骤
·安装与卸载MySQL数据库系统服务的常见问题
·Mysql 安全注意事项
·初学MySql5 所应了解的知识和常见问题
·MySQL数据库学习手册之安装MySQL
·无法远程登入MySQL数据库的三种解决办法
·讲解Ubuntu下MySQL数据库安装后初步设置
·MySQL数据库管理员迅速回答常见问题汇总
·详细介绍优化mysql性能的十个参数
·MySQL中执行SQL语句时的两个注意点
·帮助你如何迅速优化你MySQL数据库性能
·PHP+MYSQL建设网站程序需要注意两点
·资深专家手把手教你安装MYSQL数据库
·实战经验:PHP+MySQL数据库论坛简易通
热点TOP10
·怎样从Windows命令行启动MySQL?
·MySQL数据库简介
·怎样测试 MySQL安装是否成功?
·MySQL中执行SQL语句时的两个注意点
·C#连接mysql
·MySQL管理工具SQLyog最新6.1下载
·问题解决:无法载入MYSQL扩展,请检查PHP配置
·修改MYSQL数据库,数据表,字段的编码(解决JSP乱码)
·SQL中HAVING从句的用法
·Sql Server数据库定时自动备份
·MySQL ODBC进行MySQL和SQL Server转换
·Weblogic 9.1的domain配置mysql连接池
·讲解Ubuntu下MySQL数据库安装后初步设置
·安全的配置和应用MySQL数据库
·初学MYSQL应知道:Mysql参数优化
·指导:MySQL数据库导出和导入的方法
·入门:MYSQL基础
·Mysql 安全注意事项
·编制一个Mysql数据库自动备份脚本
·MySQL数据库学习手册之安装MySQL

How To Set Up A Load-Balanced MySQL Cluster - Part 7

日期:2007年7月2日 作者: 查看:[大字体 中字体 小字体]


6.4 Create A Database Called ldirector

Next we create the ldirector database on our MySQL cluster nodes sql1.example.com and sql2.example.com. This database will be used by our load balancers to check the availability of the MySQL cluster nodes.

sql1.example.com:

mysql -u root -p
GRANT ALL ON ldirectordb.* TO 'ldirector'@'%' IDENTIFIED BY 'ldirectorpassword';
FLUSH PRIVILEGES;
CREATE DATABASE ldirectordb;
USE ldirectordb;
CREATE TABLE connectioncheck (i INT) ENGINE=NDBCLUSTER;
INSERT INTO connectioncheck () VALUES (1);
quit;

sql2.example.com:

mysql -u root -p
GRANT ALL ON ldirectordb.* TO 'ldirector'@'%' IDENTIFIED BY 'ldirectorpassword';
FLUSH PRIVILEGES;
CREATE DATABASE ldirectordb;
quit;

 

6.5 Prepare The MySQL Cluster Nodes For Load Balancing

Finally we must configure our MySQL cluster nodes sql1.example.com and sql2.example.com to accept requests on the virtual IP address 192.168.0.105.

sql1.example.com / sql2.example.com:

apt-get install iproute

Add the following to /etc/sysctl.conf:

sql1.example.com / sql2.example.com:

vi /etc/sysctl.conf

# Enable configuration of arp_ignore option
net.ipv4.conf.all.arp_ignore = 1

# When an arp request is received on eth0, only respond if that address is
# configured on eth0. In particular, do not respond if the address is
# configured on lo
net.ipv4.conf.eth0.arp_ignore = 1

# Ditto for eth1, add for all ARPing interfaces
#net.ipv4.conf.eth1.arp_ignore = 1


# Enable configuration of arp_announce option
net.ipv4.conf.all.arp_announce = 2

# When making an ARP request sent through eth0 Always use an address that
# is configured on eth0 as the source address of the ARP request. If this
# is not set, and packets are being sent out eth0 for an address that is on
# lo, and an arp request is required, then the address on lo will be used.
# As the source IP address of arp requests is entered into the ARP cache on
# the destination, it has the effect of announcing this address. This is
# not desirable in this case as adresses on lo on the real-servers should
# be announced only by the linux-director.
net.ipv4.conf.eth0.arp_announce = 2

# Ditto for eth1, add for all ARPing interfaces
#net.ipv4.conf.eth1.arp_announce = 2

sysctl -p


[1] [2] 下一页 




上一篇:How To Set Up A Load-Balanced MySQL Cluster - Part 6

下一篇:How To Set Up A Load-Balanced MySQL Cluster - Part 8

How To Set Up A Load-Balanced MySQL Cluster - Part 7 相关文章:
·Windows XP下PHP+MySQL环境搭建
·怎样从Windows命令行启动MySQL?
·PHP+MySQL 购物车程序实例
·如何建立一个 CCIE Home Lab之Part Six
·Apache+PHP+MySQL+Wordpress 本地架设笔记
·WindowsXP+IIS+PHP5+MySQL5+Zend+GD库+phpMyAdmin+PHPWind 5.3 安装教程
·Php+Mysql注入专题
·MySQL数据库简介
·如何备份及导入mysql数据库
·Partition Magic错误信息与解决方法
How To Set Up A Load-Balanced MySQL Cluster - Part 7 相关软件:
·PartitionMagicV8.05
·SQL/MYSQL/数据库教程专栏
·PHP+MySQL网络开发技术
·Sun SCSA for Solaris 8 Part 2 模拟试题
·Particle Fire(焰火屏保) V2.0 汉化版
·逐步精通数据库 MYSQL
·自学 PHP、MySQL和Apache(PDF)
·PHP Apache 和 MySQL 网页开发初步(PDF)
·PHP/MySQL Programming for the Absolute Beginner
·PHP and MySQL for Dummies(第二版)

特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.vipcn.net
| 帮助(?) | 版权声明 | 友情连接 | 关于我们 | 信息发布
Copyright 2007 www.vipcn.net All Rights Reserved. 鄂ICP备05000083号Powered by:viphot