赞
踩
MySQL 8.0 OCP (1Z0-908) 考点精析-安装与配置考点1:设置系统变量
【MySQL】控制MySQL优化器行为方法之optimizer_switch系统变量
【MySQL】MySQL系统变量(system variables)列表(mysqld --verbose --help的结果例)
【MySQL】MySQL系统变量(system variables)列表(SHOW VARIABLES 的结果例)
MySQL 8.0 OCP (1Z0-908) 考点精析-备份与恢复考点1:MySQL Enterprise Backup概要
MySQL 8.0 OCP (1Z0-908) 考点精析-性能优化考点1:sys.statement_analysis视图
MySQL 8.0 OCP (1Z0-908) 考点精析-性能优化考点2:系统变量的确认
MySQL 8.0 性能优化之 EXPLAIN ANALYZE
MySQL 8.0 性能优化之 慢速查询日志(slow query log)
MySQL 8.0 性能优化之 表连接算法(join algorithm)
MySQL 8.0 性能优化之 MySQL Enterprise Monitor之Query Analyzer
MySQL 8.0 架构 之数据字典(Data Dictionary)
MySQL 8.0 InnoDB Tablespaces之System Tablespace(系统表空间)
MySQL 8.0 InnoDB Tablespaces之File-per-table tablespaces(单独表空间)
MySQL 8.0 InnoDB Tablespaces之General Tablespaces(通用表空间/一般表空间)
MySQL 8.0 InnoDB Tablespaces之Temporary Tablespaces(临时表空间)
MySQL 8.0 InnoDB Tablespaces之Undo Tablespaces(UNDO表空间)
【MySQL】在数据目录之外创建InnoDB 表(Creating Tables Externally)
MySQL 8.0 InnoDB 架构之 日志缓冲区(Log Buffer)和重做日志(Redo Log)
MySQL 8.0 架构 之错误日志文件(Error Log)(1)
MySQL 8.0 架构 之错误日志文件(Error Log)(2)
MySQL 8.0 架构 之 通用查询日志(General Query Log)
MySQL 8.0 架构 之 二进制日志文件(Binary log)
MySQL 8.0 架构 之 慢查询日志(Slow query log)
MySQL中有多种类型的日志文件,这些日志可用于故障排除、性能调整和审计等目的,帮助找出正在发生的活动。
常见的日志文件包括:
日志类型 | 写入日志的信息 |
---|---|
错误日志(Error log) | 启动、运行或停止mysqld时遇到的问题 |
二进制日志(Binary log) | 更改数据的语句(也用于复制) |
中继日志(Relay log) | 从复制源服务器接收到的数据更改 |
通用查询日志(General query log) | 已建立的客户端连接和从客户端接收到的语句 |
慢查询日志(Slow query log) | 执行时间超过long_query_time秒的查询 |
DDL日志(元数据日志)(DDL log) | DDL语句执行的元数据操作 |
MySQL DDL日志(DDL log)也称为元数据日志,不需要用户配置(用户也无法配置),会根据需要自动创建在MySQL数据目录中,默认文件名为ddl_log.log。
DDL日志(DDL log)用于记录由数据定义语句(如添加和删除分区)生成的元数据操作。
是一个二进制文件,所以无法直接阅读,同时也不建议以任何方式修改其内容。
详细可以参考如下官方文档。
参考:8.0版本中已经不存在相关的描述。
MySQL 5.7:5.4.6 The DDL Log
The DDL log, or metadata log, records metadata operations generated by data definition statements affecting table partitioning, such as ALTER TABLE t3 DROP PARTITION p2, where we must make certain that the partition is completely dropped and that its definition is removed from the list of partitions for table t3. MySQL uses this log to recover from a crash occurring in the middle of a partitioning metadata operation.
A record of partitioning metadata operations is written to the file ddl_log.log, in the MySQL data directory. This is a binary file; it is not intended to be human-readable, and you should not attempt to modify its contents in any way.
ddl_log.log is not created until it is actually needed for recording metadata statements, and is removed following a successful start of mysqld. Thus, it is possible for this file not to be present on a MySQL server that is functioning in a completely normal manner.
ddl_log.log can hold up to 1048573 entries, equivalent to 4 GB in size. Once this limit is exceeded, you must rename or remove the file before it is possible to execute any additional DDL statements. This is a known issue (Bug #83708).
在MySQL 5.7中存在已知问题Bug #83708 ,即ddl_log.log最多可容纳1048573个输入,大小相当于4 GB。超出此限制后,您必须重命名或删除该文件,才能执行任何其他DDL语句。
参考:
https://bugs.mysql.com/bug.php?id=83708
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。