wiredpea
asked on
Adding a new SQL node to a mysql Cluster
Hello,
I have this MySQL cluster running and I wanted to add a sql node.
So I have added the new node to the management node and added the management node to the my.cnf of the sql node.
After that I have restarted all the datanodes and when I view the configuration in the management node it shows the following:
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.103 (Version: 5.0.32, Nodegroup: 0)
id=3 @192.168.0.104 (Version: 5.0.32, Nodegroup: 0, Master)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.108 (Version: 5.0.32)
[mysqld(API)] 2 node(s)
id=4 @192.168.0.101 (Version: 5.0.32)
id=5 @192.168.0.102 (Version: 5.0.32)
So everything seems to be configured correctly and the cluster management node is aware of all the data and sql nodes.
The problem however is, that the new datanode does not load the databases. When I would do execute 'SHOW DATABASES' on the new sql node it only shows me the standard databases which come with MySQL, and not the databases running in the cluster.
Is there a step that I have forgotten?
I have this MySQL cluster running and I wanted to add a sql node.
So I have added the new node to the management node and added the management node to the my.cnf of the sql node.
After that I have restarted all the datanodes and when I view the configuration in the management node it shows the following:
Cluster Configuration
---------------------
[ndbd(NDB)] 2 node(s)
id=2 @192.168.0.103 (Version: 5.0.32, Nodegroup: 0)
id=3 @192.168.0.104 (Version: 5.0.32, Nodegroup: 0, Master)
[ndb_mgmd(MGM)] 1 node(s)
id=1 @192.168.0.108 (Version: 5.0.32)
[mysqld(API)] 2 node(s)
id=4 @192.168.0.101 (Version: 5.0.32)
id=5 @192.168.0.102 (Version: 5.0.32)
So everything seems to be configured correctly and the cluster management node is aware of all the data and sql nodes.
The problem however is, that the new datanode does not load the databases. When I would do execute 'SHOW DATABASES' on the new sql node it only shows me the standard databases which come with MySQL, and not the databases running in the cluster.
Is there a step that I have forgotten?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
[root@localhost ~]# su mysql
[mysql@localhost root]$ mysqld
081215 23:28:55 InnoDB: Started; log sequence number 0 46419
081215 23:28:55 [Note] NDB: NodeID is 5, management server '192.168.123.55:1186'
081215 23:28:57 [Note] NDB[0]: some storage nodes connected
081215 23:28:57 [Warning] NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
081215 23:28:57 [Note] Starting Cluster Binlog Thread
081215 23:28:57 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=localhost-rel ay-bin' to avoid this problem.
081215 23:28:57 [Note] Event Scheduler: Loaded 0 events
081215 23:28:57 [Note] mysqld: ready for connections.
Version: '5.1.27-ndb-6.3.17-cluster -gpl' socket: '/var/lib/mysql/mysql.sock ' port: 3306 MySQL Cluster Server (GPL)
081215 23:28:57 [Warning] NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
what does this mean and how to fix this
thanks
[mysql@localhost root]$ mysqld
081215 23:28:55 InnoDB: Started; log sequence number 0 46419
081215 23:28:55 [Note] NDB: NodeID is 5, management server '192.168.123.55:1186'
081215 23:28:57 [Note] NDB[0]: some storage nodes connected
081215 23:28:57 [Warning] NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
081215 23:28:57 [Note] Starting Cluster Binlog Thread
081215 23:28:57 [Warning] Neither --relay-log nor --relay-log-index were used; so replication may break when this MySQL server acts as a slave and has his hostname changed!! Please use '--relay-log=localhost-rel
081215 23:28:57 [Note] Event Scheduler: Loaded 0 events
081215 23:28:57 [Note] mysqld: ready for connections.
Version: '5.1.27-ndb-6.3.17-cluster
081215 23:28:57 [Warning] NDB: server id set to zero will cause any other mysqld with bin log to log with wrong server id
what does this mean and how to fix this
thanks
when i ran this question in mysql console the following error is coming
ERROR 1005 (HY000): Can't create table 'clusterDB.clusterTable' (errno: 157)
how to fix this.
thanks