问题标签 [mysqlbinlog]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
551 浏览

mysql - 禁用特定表的 BinLogging,在哪里执行参数更改

要禁用给定表的 bin 日志记录,我知道我可以使用以下命令:

复制忽略表=db_name.tbl_name

但是我不确定我需要在哪里执行它?

谢谢,

0 投票
0 回答
84 浏览

mysql - 我在哪里可以找到 mysqlbinlog 文件格式?

有没有可以找到mysqlbinlog文件格式的地方?我正在编写一些脚本来将更新移动到另一种格式,不必解析 mysqlbinlog 输出注释会非常好。

0 投票
2 回答
13925 浏览

mysql - 来自 mysql 控制台的 mysql binlog 路径

有没有办法从 mysql 控制台知道 bin 日志文件路径,因为我们可以通过使用知道它是 ON 还是 OFF

0 投票
1 回答
570 浏览

mysql - Abnormally high MySQL writes and larger than normal Binary Log files. How can I determine what caused this?

We have a MySQL master database which replicates to a MySQL slave. We were experiencing issues where MySQL was showing a high number of writes (but not an increased number of queries being ran) for a short period of time (a few hours). We are trying to investigate the cause.

Normally our binary logs are 1 GB in file size but during the period that we were experiencing these issues, the log files jumped to 8.5 GB.

When I run mysqlbinlog --short-form BINARYLOG.0000 on one of the 8.5 GB binary log it only returns 196 KB of queries and data. When I run mysqlbinlog --short-form on a normal binary log (1 GB) it returns around 8,500 KB worth of queries and database activity. That doesn't make sense because it has 7 GB more of data yet returns less than a 1 GB binary log file.

I see lots of these statements with very sequential timestamps, but I'm not sure if that's related to the problem because they're in both the normal period as well as when we experienced these issues.

How can I determine what caused those binary logs to balloon in size which also caused high writes, so much so it took the server offline at points, almost like a DDoS attack would?

How could mysqlbinlog return so much less data, even though the binary log file itself had 7 GB more? What can I do to identify the difference between a normal period where the binary logs are 1 GB to the period we had issues with the 8 GB binary log? Thank you for any help you can provide.

Bill

0 投票
0 回答
192 浏览

mysql - mysql binlog 输出文件不明确?

我用

我的表有一列是 varbinary。所以 res.000001 像这样

我发现binlog会将不可见字符转换为十六进制(例如"\n", "\r"),普通字符将直接打印(例如"%", "a")。有问题。如果这一列是"\x10",binlog 会输出"\x10"(我们称之为 case 1),如果这一列是这些 hex 也是 的字符"0x10",binlog 会输出"\x10"TOO(我们称之为 case 2)。所以我不能谈论这些字符串之间的区别。

在情况 1 中,我认为 binlog 应该输出"\x10"以转义反斜杠。这是mysql binlog的bug吗?

0 投票
1 回答
2973 浏览

c# - 阅读MySql binlog

我不同意这个问题得到了有效的回答:decode mysqlbinlog in C#

我有,我认为是同样的问题:我想从 ac# 应用程序中读取 MySql 二进制日志,但不知道文件的格式。如何正确解析这些文件的数据?

0 投票
1 回答
18065 浏览

mysql - mysqld:找不到文件'/var/log/mysql/mysql-bin.index'(错误代码:13)

尝试重新启动 MySQL 服务器后,我遇到了这个错误。

我遵循的方法(并且大多数在互联网上找到)将/var/log/mysql 的权限更改为 mysql user但它不起作用

里面:

我的数据路径:

我什至也尝试重新安装 MySQL,但错误并没有消失。

请帮我!!!

更新 1:关于 my.cnf - 错误日志配置。我打开了常规日志和错误日志(到error.log)。但一般日志文件中没有任何内容。对于错误日志文件,没有比我上面复制的错误更多的了。

更新 2:关于 apparmor 或 selinux 的问题,我只是使用 apparmor。我还尝试附加:

但它要么不起作用

更新 3:

而且我相信以下更改确实适用于我的情况:

  • 必须确保 mysql 帐户对您的 mysql 日志/数据目录具有足够的权限 (rw)。从 root 或 sudoer 帐户只需尝试切换到 mysql 用户,然后创建/编辑任何测试文件。

  • 不要删除或禁用 apparmor 并使用以下内容更新 mysql 配置文件(通常为 usr.sbin.mysqld):

    /var/log/mysql-bin.index rw,

    /mysql/* 读写,

您可以根据您的情况自定义它们。

  • 重新加载mysql配置文件

    apparmor_parser -r /etc/apparmor.d/usr.sbin.mysqld

并重新启动它。

希望它会为任何遇到互联网并支付数小时以更改许可和设备而没有任何运气的人提供帮助。

0 投票
1 回答
802 浏览

mysql - MySQL binlog 读取

我在 Windows 7 上安装了 MySQL 5.5,我将其作为常规安装进行。例如,我所有的日志都存储在 C:\ProgramData\MySQL\MySQL Server 5.5\data\mysql-bin.00057 下

当我尝试运行 mysqlbinlog mysqlbin.000057 它给我错误 2 file not found

我什至试过 mysqlbinlog C:\ProgramData\MySQL\MySQL Server 5.5\data\mysql-bin.000057 它也说它找不到文件。

只是想知道如何使用 binlog 使用 mysqlbinlog 读取这些文件

0 投票
3 回答
1114 浏览

mysql - 如何订阅 mysql 表的更新、删除和插入?

我想在某些 mysql(或 mariadb)表(innodb)更新、插入或删除发生时收到通知。

我需要尽快从另一个进程中跟踪这些更改,

我在想也许我可以订阅 mysql 二进制日志?有人可以解释如何做到这一点吗?例如,是否有 mysql 提供的日志读取 API?

当我使用 Galera 集群时,游戏会改变吗?

0 投票
3 回答
4276 浏览

mysql - 使用 mysqlbinlog 命令找不到文件

当我使用 mysqlbinlog 命令时,我找不到该文件。