Erinevus lehekülje "Mysql cluster" redaktsioonide vahel
Allikas: Kuutõrvaja
8. rida: | 8. rida: | ||
===install=== | ===install=== | ||
− | gentoo | + | '''gentoo''' |
make.conf | make.conf | ||
15. rida: | 15. rida: | ||
emerge mysql | emerge mysql | ||
− | freebsd | + | '''freebsd''' |
25. rida: | 25. rida: | ||
===seadistamine=== | ===seadistamine=== | ||
− | + | '''management''' | |
/etc/config.ini | /etc/config.ini | ||
56. rida: | 56. rida: | ||
− | node 1 | + | '''node 1''' |
mysql_install | mysql_install | ||
75. rida: | 75. rida: | ||
− | node2 | + | ndbd --initial |
+ | |||
+ | freebsd puhul /usr/local/libexec/ndbd --initial mõlemas | ||
+ | |||
+ | '''node2''' | ||
90. rida: | 94. rida: | ||
ndbcluster | ndbcluster | ||
ndb-connectstring=193.40.0.184 | ndb-connectstring=193.40.0.184 | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
ndbd --initial | ndbd --initial | ||
104. rida: | 100. rida: | ||
===kasutamine=== | ===kasutamine=== | ||
− | + | '''management''' | |
Redaktsioon: 4. september 2007, kell 12:23
kolm masinat
management 192.168.1.10 node1 192.168.1.11 node2 192.168.1.12
install
gentoo
make.conf use="cluster"
emerge mysql
freebsd
cd /usr/ports/databases/mysql50-server make WITH_NDB=yes make install WITH_NDB=yes
seadistamine
management
/etc/config.ini
# file "config.ini" - 2 data nodes and 2 SQL nodes # This file is placed in the startup directory of ndb_mgmd (the # management server) # The first MySQL Server can be started from any host. The second # can be started only on the host mysqld_5.mysql.com [NDBD DEFAULT] NoOfReplicas= 2 DataDir= /var/lib/mysql-cluster [NDB_MGMD] Hostname= 193.40.0.184 DataDir= /var/lib/mysql-cluster [NDBD] HostName= 193.40.0.187 [NDBD] HostName= 193.40.0.183 [MYSQLD] [MYSQLD]
ndb_mgmd --config-file=/etc/config.ini
node 1
mysql_install mkdir /var/lib/mysql-cluster chown -R mysql:mysql /var/lib/mysql-cluster
/etc/mysql/my.cnf
freebsd serveris /usr/local/etc/my.cnf
[mysql_cluster] ndb-connectstring=193.40.0.184 [mysqld] ndbcluster ndb-connectstring=193.40.0.184
ndbd --initial
freebsd puhul /usr/local/libexec/ndbd --initial mõlemas
node2
mysql_install mkdir /var/lib/mysql-cluster chown -R mysql:mysql /var/lib/mysql-cluster
/etc/mysql/my.cnf
[mysql_cluster] ndb-connectstring=193.40.0.184 [mysqld] ndbcluster ndb-connectstring=193.40.0.184
ndbd --initial
kasutamine
management
localhost ~ # ndb_mgm -- NDB Cluster -- Management Client -- ndb_mgm> show Connected to Management Server at: localhost:1186 Cluster Configuration --------------------- [ndbd(NDB)] 2 node(s) id=2 @193.40.0.187 (Version: 5.0.44, Nodegroup: 0, Master) id=3 @193.40.0.183 (Version: 5.0.45, Nodegroup: 0) [ndb_mgmd(MGM)] 1 node(s) id=1 @193.40.0.184 (Version: 5.0.44) [mysqld(API)] 2 node(s) id=4 @193.40.0.187 (Version: 5.0.44) id=5 @193.40.0.183 (Version: 5.0.45) ndb_mgm>