1
votes

Setting the value for max_binlog_size doesn't seem to be a supported flag in CloudSQL 2nd Generation MySQL instances.

On provisioning a new instance, I can see from running show variables; that max binlog size is set as follows:

+-----------------+-----------+
| Variable_name   | Value     |
+-----------------+-----------+
| max_binlog_size | 104857600 |
+-----------------+-----------+

I think this value is represented in bytes, and therefore is 100MB?

So I have a couple of questions:

  1. How can I change this value without having access to the config file - I don't want so much log rotation going on during busy moments.

  2. What is some best practice around setting max bin log size, how big is too big etc?

1

1 Answers

2
votes
  1. You cannot change that value due to your Cloud SQL instance is manage by Google.
  2. That value is the maximum size that every binlog file can have, but your Cloud SQL instance can have multiple binary log files (see the image below). The bin logs are only generated if you enable this option in your Cloud SQL instance. Also, here you can see the impact of this feature.

SHOW BINARY LOGS;

Take into account that the bin logs files are stored for 7 days. So, it will not stay forever in your disk using your storage.