Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MySQL replication & cluster


Published on

Published in: Technology
  • Be the first to comment

MySQL replication & cluster

  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 [mysqld] server-id=2 master-host=db- master-port=3306 master-user=gooey master-password=octopus Procedure: 1. Configure master and slave 2. Stop MySQL 3. Copy data tot slave 4. Start MySQL on master 5. Start MySQL on slave
  8. 8. Cluster quick howto [MYSQLD] # file "config.ini" ndbcluster [NDBD DEFAULT] ndb-connectstring= NoOfReplicas= 1 MaxNoOfOrderedIndexes=2500 [MYSQL_CLUSTER] MaxNoOfUniqueHashIndexes=2500 ndb-connectstring= MaxNoOfAttributes=4000 Procedure: Install MySQL-MAX Configure cluster Configure MySQL Start MGM node Start ndb deamon Start MySQL
  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: Replication: Cluster: