How To Set Up A Load-Balanced MySQL Cluster - Part 7
2007-11-11 15:43:32 来源:WEB开发网6.4 Create A Database Called ldirector
Next we create the ldirector database on our MySQL(和PHP搭配之最佳组合) 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(和PHP搭配之最佳组合) cluster nodes.
sql1.example.com:
MySQL(和PHP搭配之最佳组合) -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(和PHP搭配之最佳组合) -u root -p
GRANT ALL ON ldirectordb.* TO 'ldirector'@'%' IDENTIFIED BY 'ldirectorpassword';
FLUSH PRIVILEGES;
CREATE DATABASE ldirectordb;
quit;
6.5 Prepare The MySQL(和PHP搭配之最佳组合) Cluster Nodes For Load Balancing
Finally we must configure our MySQL(和PHP搭配之最佳组合) 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 |
sysctl -p
Add this section for the virtual IP address to /etc/network/interfaces:
sql1.example.com / sql2.example.com:
vi /etc/network/interfaces
auto lo:0 |
ifup lo:0
- ››TOscilloscope 仿Windows任务管理器CPU使用记录组...
- ››How to Make a Dark, Post-Apocalyptic City Illu...
- ››tomcat不支持TCP/IP6协议
- ››setTimeout()在js类中的使用方法
- ››tomcat 下的 url 大小写问题
- ››tomcat6.0.28 内存溢出PermGen Space
- ››Setting up proxy for Android Emulator
- ››Tomcat 系统架构与设计模式,第 2 部分: 设计模式...
- ››Tomcat 系统架构与设计模式,第 1 部分: 工作原理...
- ››How to (almost) create your own iPhone OS fram...
- ››TOMCAT和IIS整合
- ››Tomcat性能调优方案
更多精彩
赞助商链接