Mysql replication-cluster-090801075641-phpapp01

405 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
405
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mysql replication-cluster-090801075641-phpapp01

  1. 1. MySQL replication & cluster by Joeri de Bruin ProcoliX
  2. 2. Single vs Multiple Multiple MySQL servers means that there are more MySQL services, this will normaly be on more servers.
  3. 3. Why multiple 1. High availability 2. On line backup
  4. 4. replication vs cluster
  5. 5. Proces Replication 1. UPDATE on master 2. UPDATE written in Binlog 3. Binlog is read by slave 4. UPDATE on slave Cluster 1. UPDATE on MySQL 2. UPDATE written to Cluster filesystem
  6. 6. Uses Replication has 1 master and slaves Cluster can read and write on all nodes
  7. 7. Replication quick howto Procedure: 1. Configure master and slave 2. Stop MySQL 3. Copy data tot slave 4. Start MySQL on master 5. Start MySQL on slave [mysqld] server-id=2 master-host=db- master.mycompany.com master-port=3306 master-user=gooey master-password=octopus
  8. 8. Cluster quick howto Procedure: Install MySQL-MAX Configure cluster Configure MySQL Start MGM node Start ndb deamon Start MySQL [MYSQLD] ndbcluster ndb-connectstring=192.168.0.10 [MYSQL_CLUSTER] ndb-connectstring=192.168.0.10 # file "config.ini" [NDBD DEFAULT] NoOfReplicas= 1 MaxNoOfOrderedIndexes=2500 MaxNoOfUniqueHashIndexes=2500 MaxNoOfAttributes=4000
  9. 9. MySQL cluster and WebGUI MySQL cluster uses NDB cluster engine in stead of MyIsam tables Alter create.sql to use with MySQL cluster vi create.sql :0,$s/TYPE=MyISAM/ENGINE=NDBCLUSTER/g
  10. 10. Tips and tricks Always use the same MySQL version Use the source: www.mysql.com Replication: http://dev.mysql.com/doc/mysql/en/replication.html Cluster: http://dev.mysql.com/doc/mysql/en/multi-computer.html

×