Hi,
I am trying to access the binary log files of a cloud sql instance using mysqlbinlog. I used the following command from a GCE vm which has access to the cloud sql instance:
$ mysqlbinlog --read-from-remote-server --host=xxx --user=xxx --password=xxx mysql-bin.00pqrs
but getting the following error from the above command :
ERROR: Got error reading packet from server: Binary log is not open
Any idea what might be going wrong? I have confirmed the following cases:
- Binary logs are already enabled on this server and there is a working read-replica of this instance.
- queries are running fine from this GCE vm using the mysql client.
- the mysql user already have 'REPLICATION SLAVE' privilege
- Accessing any binlog file from the output of 'SHOW BINARY LOGS' gives the same error.
I am also wondering what are the alternate ways to access the raw binlog files? Is there a simple way to just export these to cloud storage?
Thanks,
Amit