An error occurred while configuring MysqlCluster: Unabletoconnectwithconnectstring: nodeid0, localhost: 1186. the following error occurs when executing/etc/init. d/ndbd -- initial.
[Root @ ndbd1 ~] #/Etc/init. d/ndbd -- initial
Unable to connect with connect string: nodeid = 0, localhost: 1186
Retrying every 5 seconds. Attempts left: 12 11 10 9 8 7 6 5 4 3 2 1, failed.
Solution
1. view the/etc/my. cnf file configuration
[Root @ ndbd1 ~] # Cat/etc/my. cnf
[Mysqld]
Datadir =/var/lib/mysql
Socket =/var/lib/mysql. sock
User = mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
Symbolic-links = 0n
[Mysqld_safe]
Log-error =/var/log/mysqld. log
Pid-file =/var/run/mysqld. pid
2. modify the configuration file
[Root @ ndbd1 ~] # Vim/etc/my. cnf
[Mysqld]
Datadir =/var/lib/mysql
Socket =/var/lib/mysql. sock
User = mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
Symbolic-links = 0
Ndbcluster
Ndb-connectstring = 192.168.0.30
[MYSQL_CLUSTER]
Ndb-connectstring = 192.168.0.30
[Mysqld_safe]
Log-error =/var/log/mysqld. log
Pid-file =/var/run/mysqld. pid
3. reinitialize
[Root @ ndbd1 ~] #/Etc/init. d/ndbd -- initial
21:45:17 [ndbd] INFO -- Angel connected to '192. 168.0.30: 100'
21:45:17 [ndbd] INFO -- Angel allocated nodeid: 2
Problem solving