Fedora 20에서 mysql cluster 구성하는데 잘 안됩니다...
Fedora 20에서 mysql cluster 구성하는데 잘 안됩니다...
제가 생각하고 있는 구성은 서버 2대에
(192.168.80.30 / 192.168.80.40)
MGM 각각 1개,
NDE 각각 1개,
MYSQLD 각각 1개 해서
클러스터링 되는 구조를 만드는 중인데요.
이게 mgm 시작은 되는데 시작하고 연결이 잘 안되네요.
현재 config 입니다...
편의를 위해 1호기, 2호기라고 지칭하겠습니다..
[1호기 세팅]
[[[[/etc/my.cnf]]]]
[mysqld]
ndbcluster
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
port=3603
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld/mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
# Currently, there are mariadb and community-mysql packages in Fedora.
# This particular config file is included in respective RPMs of both of them,
# so the following settings are general and will be also used by both of them.
# Otherwise the RPMs would be in conflict.
# Settings for particular implementations like MariaDB are then
# defined in appropriate sections; for MariaDB server in [mariadb] section in
# /etc/my.cnf.d/server.cnf (part of mariadb-server).
# It doesn't matter that we set these settings only for [mysqld] here,
# because they will be read and used in mysqld_safe as well.
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld_safe]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[MYSQL_CLUSTER]
ndb-connectstring=192.168.80.10
[[[[/var/lib/mysql-cluster/config.ini]]]]
[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=80M
IndexMemory=52M
[TCP DEFAULT]
portnumber=1186
[NDB_MGMD]
id=1
hostname=192.168.80.30
datadir=/var/lib/mysql-cluster
[NDB_MGMD]
id=2
hostname=192.168.80.40
datadir=/var/lib/mysql-cluster
[NDBD]
id=11
hostname=192.168.80.30
datadir=/usr/local/mysql/data
[NDBD]
id=12
hostname=192.168.80.40
datadir=/usr/local/mysql/data
[MYSQLD]
id=21
hostname=192.168.80.30
[MYSQLD]
id=22
hostname=192.168.80.40
[2호기 세팅]
[[[[[[[[ /etc/my.cnf ]]]]]]]
[mysqld]
ndbcluster
port=3603
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
# Settings user and group are ignored when systemd is used.
# If you need to run mysqld under a different user or group,
# customize your systemd unit file for mysqld/mariadb according to the
# instructions in http://fedoraproject.org/wiki/Systemd
# Currently, there are mariadb and community-mysql packages in Fedora.
# This particular config file is included in respective RPMs of both of them,
# so the following settings are general and will be also used by both of them.
# Otherwise the RPMs would be in conflict.
# Settings for particular implementations like MariaDB are then
# defined in appropriate sections; for MariaDB server in [mariadb] section in
# /etc/my.cnf.d/server.cnf (part of mariadb-server).
# It doesn't matter that we set these settings only for [mysqld] here,
# because they will be read and used in mysqld_safe as well.
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[mysqld_safe]
#
# include all files from the config directory
#
!includedir /etc/my.cnf.d
[mysql-cluster]
ndbcluster
ndb-connectstring=192.168.80.30
[[[[ /var/lib/mysql-cluster/config.ini ]]]]
[NDBD DEFAULT]
NoOfReplicas=2
DataMemory=80M
IndexMemory=52M
[TCP DEFAULT]
portnumber=1186
[NDB_MGMD]
id=1
hostname=192.168.80.30
datadir=/var/lib/mysql-cluster
[NDB_MGMD]
id=2
hostname=192.168.80.40
datadir=/var/lib/mysql-cluster
[NDBD]
id=11
hostname=192.168.80.30
datadir=/usr/local/mysql/data
[NDBD]
id=12
hostname=192.168.80.40
datadir=/usr/local/mysql/data
[MYSQLD]
id=21
hostname=192.168.80.30
[MYSQLD]
id=22
hostname=192.168.80.40
위와같이 config 설정 되어있고..
양쪽에 mgm 스타트 까진 정상적으로 됩니다, 그런데.
[root@ndbd1 mysql-cluster]# ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: 192.168.80.10:1186
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 (not connected, accepting connect from 192.168.80.30)
id=3 (not connected, accepting connect from 192.168.80.40)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.80.10 (Version: 5.0.19)
[mysqld(API)] 2 node(s)
id=4 (not connected, accepting connect from 192.168.80.30)
id=5 (not connected, accepting connect from 192.168.80.40)
이것과 같이 자신의 MGM 이외에는 어떤것도 표시되지 않습니다.
이유가 무엇일까요...
iptable 꺼져있고 telnet 정상적으로 붙습니다.
양쪽에서 ndbd -c [상대IP]:1186 명령어도 해봤구요.
어쩌다가 생길때도 있는데 그럴떄는 mgm, node 까지만 표시되고 mysqld 가 표시가 안돼요...
뭐가 문제일까요.
댓글 달기