Redhat 6.5下MySQL5.6集群配置方法完整版

2019-10-13 23:00:52于丽

                  # default values. Since the "world" database takes up
                  # only about 500KB, this should be more than enough for
                  # this example Cluster setup.
 
[tcp default]
                  # This the default; however, you can use any
                  # port that is free for all the hosts in the cluster
                  # Note: It is recommended that you do not specify the port
                  # number at all and simply allow the default value to be used
                  # instead
 
[ndb_mgmd]
hostname=192.168.1.110          # Hostname or IP address of MGM node
datadir=/var/lib/mysql-cluster  # Directory for MGM node log files
NodeId=1
 
[ndbd]
hostname=192.168.1.111        # Hostname or IP address
datadir=/u01/app/mysql/data  # Directory for this data node's data files
NodeId=2
 
[ndbd]
hostname=192.168.1.112        # Hostname or IP address
datadir=/u01/app/mysql/data  # Directory for this data node's data files
NodeId=3
 
 
[mysqld]
hostname=192.168.1.111        # Hostname or IP address
NodeId=4                      # (additional mysqld connections can be
                              # specified for this node for various
                              # purposes such as running ndb_restore)
 
[mysqld]
hostname=192.168.1.112        # Hostname or IP address
NodeId=5                      # (additional mysqld connections can be
                              # specified for this node for various