mysql cluster数据节点启动问题
本人在搭建MySQL cluster(版本7.2), 管理节点的配置如下:
[ndbd default]
NoOfReplicas=1
DataMemory=200M
IndexMemory=20M
[ndb_mgmd]
NodeId=1
hostname=172.3.200.156
datadir=/var/lib/mysql-cluster/
[ndbd]
NodeId=5
hostname=172.3.200.161
datadir=/usr/local/mysql/ndbdata/
[ndbd]
NodeId=6
hostname=172.3.200.162
datadir=/usr/local/mysql/ndbdata/
[ndbd]
NodeId=7
hostname=172.3.200.163
datadir=/usr/local/mysql/ndbdata/
[ndbd]
NodeId=8
hostname=172.3.200.164
datadir=/usr/local/mysql/ndbdata/
[mysqld]
hostname=172.3.200.158
[mysqld]
hostname=172.3.200.160
[mysqld]
[mysqld]
数据节点的配置如下:
[client]
#password = your_password
port = 3306
socket = /tmp/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
port = 3306
socket = /tmp/mysql.sock
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 1M
table_open_cache = 256
sort_buffer_size = 1M
read_buffer_size = 1M
read_rnd_buffer_size = 4M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size= 16M
ndbcluster
ndb-connectstring = 172.3.200.156
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 8
log-bin=mysql-bin
# binary logging format - mixed recommended
binlog_format=mixed
server-id = 1
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
[mysql_cluster]
ndb-connectstring = 172.3.200.156
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
启动数据节点: ndbd --initial
报错如下:
Unable to connect with connect string: nodeid=0,172.3.200.156:1186
Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
2014-12-03 15:34:15 [ndbd] ERROR -- Could not connect to management server, error: ''
本人ping管理节点,可以ping通,到底是什么原因了???
上面的错误该如何解决了?