MySQL server cluster introduction and configuration details

Source: Internet
Author: User

1. Check whether you should use a MySQL cluster.

Reduce the pressure on the data center nodes and process large data volumes. MySQL is distributed and one or more applications correspond to one MySQL database. Share data with the common data of several MySQL databases, such as shopping cart and user objects, in data nodes. Other non-shared data is maintained in the MySQL database.

  

 

2. Concept of name in cluster MySQL (for example)

1) SQL node (SQL node -- corresponding to MySQLd): Distributed Database. Including the data of itself and the data of the query center node.

2) Data node (Data node -- ndbd): the cluster shares Data (in memory ).

3) Management Server (Management Server-ndb_mgmd): Cluster Management SQL node and Data node.

3. Configuration

MySQL-max version, of course, is not supported on the MySQL cluster system windonws platform.

I won't talk much about installing MySQL. There are a lot of online information, which is concise and concise.

A: 192.168.1.20.- Data node and Management Server.

B: 192.168.1.254-SQL node.

Of course, you can also make one machine three at the same time.

A, B my. inf plus:

 

 
 
  1. MySQLD]                           
  2. ndbcluster                     # run NDB engine    
  3. ndb-connectstring=192.168.1.251 # location of MGM node       
  4. # Options for ndbd process:  [MySQL_CLUSTER]                    
  5. ndb-connectstring=192.168.1.251 # location of MGM node       
  6. A: /var/lib/MySQL-cluster/config.ini  [NDBD DEFAULT]       
  7. NoOfReplicas=1     
  8. # Number of replicas  DataMemory=80M     
  9. # How much memory to allocate for data storage  IndexMemory=18M    
  10. # How much memory to allocate for index storage                     
  11. # For DataMemory and IndexMemory, we have used the                    
  12. # default values. Since the "world" database takes up                     
  13. # only about 500KB, this should be more than enough for                     
  14. # this example Cluster setup.  # TCP/IP options:  [TCP DEFAULT]        
  15. portnumber=2202  # This the default; however, you can use any                     
  16. # port that is free for all the hosts in cluster                     
  17. # Note: It is recommended beginning with MySQL 5.0 that                    
  18. # you do not specify the portnumber at all and simply allow                     
  19. # the default value to be used instead  # Management process options:  [NDB_MGMD]                       hostname=192.168.1.251            
  20. # Hostname or IP address of MGM node  datadir=/var/lib/MySQL-cluster # Directory for MGM node logfiles  # Options for data node "A":  [NDBD]                             
  21. # (one [NDBD] section per data node)  hostname=192.168.1.251           
  22.  # Hostname or IP address  datadir=/usr/local/MySQL/data    
  23. # Directory for this data nodes datafiles   
  24. # SQL node options:  [MySQLD]  hostname=192.168.1.254    
  25. #[MySQ

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.