MySQL server cluster introduction and configuration detailed

Source: Internet
Author: User
Tags sql mysql mysql in mysql database

1. Find out if you should use MySQL cluster first.

Reduce data Center node pressure and large amount of data processing, using the MySQL distribution, one or more application corresponding to a MySQL database. A few MySQL database common data to make shared data, such as shopping carts, user objects and so on, there are data nodes inside. Other data that is not shared is maintained in its own distributed MySQL database itself.

  

2. Cluster MySQL in the name concept. (as pictured above)

1 SQL node (mysqld on SQL node--): distributed database. including its own data and query center node data.

2 Data node-NDBD: Cluster shared data (in-memory).

3 Management Server (Management SERVER–NDB_MGMD): Cluster Management SQL Node,data node.

3. Configure

Mysql-max version, of course, now MySQL cluster system WINDONWS platform is not supported.

Install MySQL is not much to say, a lot of online, concise.

A:192.168.1.251–data node and management Server.

B:192.168.1.254–sql node.

Of course, you can also make a machine for 3 people 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 is more than enough for
  14. # This example Cluster setup. # TCP/IP options: [TCP DEFAULT]
  15. portnumber=2202 # this default; However, can use any
  16. # port, is, free, all, the hosts in cluster
  17. # Note:it is recommended beginning with MySQL 5.0
  18. # You don't 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 the 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 node ' s datafiles
  24. # SQL node options: [MySQLD] hostname=192.168.1.254
  25. #[mysqld] #这个相当于192.168.1.251




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.