Skip to content
This repository has been archived by the owner on Oct 29, 2023. It is now read-only.

show_binlog expects different log files #157

Closed
fjssilva opened this issue Dec 5, 2022 · 3 comments
Closed

show_binlog expects different log files #157

fjssilva opened this issue Dec 5, 2022 · 3 comments
Assignees
Labels
adjustment It's a new feature or behavior change triggered by a MySQL bug, new feature, or policy.

Comments

@fjssilva
Copy link

fjssilva commented Dec 5, 2022

The script show_binlog expects the bin-log files to be named data/mysql-bin.[0-9]* however the default file names are data/binlog.[0-9]*.

Just run show_binlog in a sanbox. The output shows something like this:

ls: cannot access 'data/mysql-bin.[0-9]*': No such file or directory
No binlog found in (...)/data
# Usage: msb_8.0.31/show_binlog [BINLOG_PATTERN] 
# Where BINLOG_PATTERN is a number, or part of a number used after 'mysql-bin'
# (The default is '[0-9]*]')
# examples:
#          ./show_binlog 000001 | less 
#          ./show_binlog 000012 | vim - 
#          ./show_binlog  | grep -i 'CREATE TABLE'

The script should work out of the box without any options or changes.

Ran on:

  • OS: Ubuntu 20.04
  • dbdeployer 1.70.0
  • latest mysql server (8.0.31)
@datacharmer
Copy link
Owner

Thanks for reporting this issue.
The file used to be named mysql-bin.*. In fact, the script works without changes up to 5.7.
I didn't notice the change in 8.0.x. I will try to make a fix that takes old and new versions into account.

@datacharmer datacharmer self-assigned this Dec 5, 2022
@datacharmer datacharmer added the adjustment It's a new feature or behavior change triggered by a MySQL bug, new feature, or policy. label Dec 5, 2022
@datacharmer
Copy link
Owner

datacharmer commented Dec 5, 2022

Additional info:
This problem only exists if you use a single sandbox, without options. Only 8.0 sandboxes will enable binary logs out of the box. Previous versions require --master for that, but this option works as expected also for MySQL 8.0.x.
Or you need to deploy a replication sandbox.
In both cases, the binlog names are forced to be mysql-bin, and the script show_binlog works as expected.
This is not a transparent fix, which I will try anyway, but it should address the most common cases.

@datacharmer
Copy link
Owner

Fix released with version 1.71.0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
adjustment It's a new feature or behavior change triggered by a MySQL bug, new feature, or policy.
Projects
None yet
Development

No branches or pull requests

2 participants