mysql-bin.log内容乱码引起的show binary logs
超时未响应
在mariadb迁移部署后,备份计划一直无法启动。查看报错是因为执行show binary logs
命令时一直没有返回结果导致超时。执行flush binary logs
也无法正常工作。查看binlog是正常工作的,执行show master status
也有正常输出。
在排查mysql-bin.index文件是发现了异常
^@^@^@^@^@^@^@^@^@^@/var/lib/mysql/mysql-bin.000233
/var/lib/mysql/mysql-bin.000234
/var/lib/mysql/mysql-bin.000235
/var/lib/mysql/mysql-bin.000236
/var/lib/mysql/mysql-bin.000237
/var/lib/mysql/mysql-bin.000238
/var/lib/mysql/mysql-bin.000239
/var/lib/mysql/mysql-bin.000240
/var/lib/mysql/mysql-bin.000241
/var/lib/mysql/mysql-bin.000242
/var/lib/mysql/mysql-bin.000243
/var/lib/mysql/mysql-bin.000244
对比另一台工作正常的服务器文件发现,文件头多一些特殊字符,正常的文件索引内容如下:
/var/lib/mysql/mysql-bin.000233
/var/lib/mysql/mysql-bin.000234
/var/lib/mysql/mysql-bin.000235
/var/lib/mysql/mysql-bin.000236
/var/lib/mysql/mysql-bin.000237
/var/lib/mysql/mysql-bin.000238
/var/lib/mysql/mysql-bin.000239
/var/lib/mysql/mysql-bin.000240
/var/lib/mysql/mysql-bin.000241
/var/lib/mysql/mysql-bin.000242
/var/lib/mysql/mysql-bin.000243
/var/lib/mysql/mysql-bin.000244
把索引文件的中的特殊字符删除,执行flush binary logs
命令后,可以正常查询到binary logs列表。
Comments | NOTHING