11

I am running NDB Cluster and I see that on mysql api nodes, there is a very big binary log table.

+---------------------------------------+--------+-------+-------+------------+---------+
| CONCAT(table_schema, '.', table_name) | rows   | DATA  | idx   | total_size | idxfrac |
+---------------------------------------+--------+-------+-------+------------+---------+
| mysql.ndb_binlog_index                | 83.10M | 3.78G | 2.13G | 5.91G      |    0.56 |

Is there any recommended way to reduce the size of that without breaking anything? I understand that this will limit the time frame for point-in-time recovery, but the data has is growing out of hand and I need to do a bit of clean up.

0

1 Answer 1

4
+50

It looks like this is possible. I don't see anything here: http://dev.mysql.com/doc/refman/5.5/en/mysql-cluster-replication-pitr.html that says you can't based on the last epoch.

Some additional information might be gained by reading this article:

http://www.mysqlab.net/knowledge/kb/detail/topic/backup/id/8309

The mysql.ndb_binlog_index is a MyISAM table. If you are cleaning it, make sure you don't delete entries of binary logs that you still need.

3
  • So just backup/dump and TRUNCATE TABLE should do the job…
    – Palec
    Dec 16, 2013 at 5:27
  • Does that ensure other operations won't fail? By other operations I mean adding a data node or an API node, and/or restarting a failed data node and other similar operations. Basically any idea what that "you still need" means exactly? Dec 16, 2013 at 20:10
  • It looks like the last epoch should be enough which would have contained the node(s) in question. It looks like you want to keep the binary logs as well from that epoch onward so they can be replayed. The second source explains the steps in a 2 node situation for reference.
    – Shawn
    Dec 16, 2013 at 20:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.