在介绍这个参数前,我们先聊聊参数log_warnings。我们知道MySQL中,其中log_error定义是否启用错误日志的功能和错误日志的存储位置,log_warnings定义是否将告警信息(warning messages)也写入错误日志。此选项默认启用,具体来说:
log_warnings 为0, 表示不记录告警信息。
log_warnings 为1, 表示告警信息写入错误日志。
log_warnings 大于1, 表示各类告警信息,例如有关网络故障的信息和重新连接信息写入错误日志。
注意,此参数在不同版本略有差别,在MySQL 5.6中,log_warnings的默认值为1,如下所示:

在MySQL 5.7中,有些版本默认值为2,有些版本默认值为1, 具体参考官方文档信息,如下所示:

Print out warnings such as Aborted connection… to the error log. This option is enabled (1) by default. To disable it, use --log-warnings=0. Specifying the option without a level value increments the current value by 1. Enabling this option by setting it greater than 0 is recommended, for example, if you use replication (you get more information about what is happening, such as messages about network failures and reconnections). If the value is greater than 1, aborted connections are written to the error log, and access-denied errors for new connection attempts are written. See Section B.5.2.11, “Communication Errors and Aborted Connections”.
If a slave server was started with --log-warnings enabled, the slave prints messages to the error log to provide information about its status, such as the binary log and relay log coordinates where it starts its job, when it is switching to another relay log, when it reconnects after a disconnect, and so forth. The server logs messages about statements that are unsafe for statement-based logging if --log-warnings is greater than 0.
将告警信息,例如连接中断等告警信息输出到错误日志。该选项默认启用(默认值为1)。要禁用它,请使用–log-warnings = 0选项。指定没有级别值的选项时,将当前值递增1. 推荐将这个值设置为大于0启用告警日志信息写入错误日志。举个例子,如果你正在使用复制(你将会获取正在发生的事情的更多详细信息,例如有关网络故障的信息和重新连接信息)。如果该值大于1,连接中断将写入错误日志,新的连接尝试访问的拒绝访问信息。参见第B.5.2.11节“通信错误和中止连接”。
如果从服务器(slave server)启动时启用了–log-warnings,则从设备将消息输出到错误日志中以提供有关其状态的信息,例如二进制日志和中继日志坐标,它在开始作业时切换到另一个中继日志,断开连接后重新连接等等。如果–log-warnings大于0,服务器将记录关于对基于语句的日志不安全的语句的消息。
注意:从MySQL 5.7.2开始,首选log_error_verbosity系统变量,而不是使用–log-warnings选项或log_warnings系统变量,这个参数从MySQL 8.0.3开始被移除了:
This system variable was removed in MySQL 8.0.3. Use the log_error_verbosity system variable instead.
而新参数log_error_verbosity更简单,它有三个可选值, 分别对应:1 错误信息;2 错误信息和告警信息; 3:错误信息、告警信息和通知信息。 具体参考官方文档,下面部分截取官方文档。
log_error_verbosity

The verbosity for handling events intended for the error log, as filtered by the log_filter_internal error log filter component. log_error_verbosity has no effect if log_filter_internal is not enabled.
The following table shows the permitted verbosity values.

Selected important system messages about non-error situations, such as startup and shutdown messages, are printed to the error log when the variable value is 1.
For additional information, see Section 5.4.2.5, “Error Log Filtering”, and Section 5.5.1, “Error Log Components”.

MySQL新参数log_error_verbosity相关推荐

  1. mysql报警级别_MySQL 5.7定义日志级别新参数(log_error_verbosity)

    log_warnings 在介绍这个参数前,我们先聊聊参数 log_warnings.我们知道 MySQL 中,其中 log_error 定义是否启用错误日志的功能和错误日志的存储位置,log_war ...

  2. MySQL配置文件mysql.ini参数详解

    my.ini(Linux系统下是my.cnf),当mysql服务器启动时它会读取这个文件,设置相关的运行环境参数. my.ini分为两块:Client Section和Server Section. ...

  3. mysql配置参数调优(8GB内存和64GB内存)

    文章目录 一.前言 二.查看服务器的CPU和内存 1.查看CPU的个数 2.查看服务器的内存 3.数据库版本 三.64GB内存的mysql配置参数 四.本机8GB内存的mysql配置参数 1.查看数据 ...

  4. mysql设置参数0和1_MySQL 8.0 首个自适应参数横空出世

    什么是自适应参数 MySQL8.0推出一个号称可以自适应服务器的参数,保证在各种不同的服务器.虚拟机.容器下自动适配服务器资源,让我们一起来看看到底它能做到什么地步. 自适应参数是如何设置和适应变化的 ...

  5. MySQL服务器参数介绍

    前面介绍了服务器硬件,操作系统,和数据库引擎对数据库性能的影响,现在我们再来看看,MYSQL服务器配置,是如何影响MYSQL性能的,大家知道,MYSQL有大量可以修改的参数,以我们演示的MYSQL系统 ...

  6. mysql.ini环境配置_MySQL配置文件mysql.ini参数详解

    my.ini(Linux系统下是my.cnf),当mysql服务器启动时它会读取这个文件,设置相关的运行环境参数. my.ini分为两块:Client Section和Server Section. ...

  7. mysql参数配置详情_MySQL配置文件mysql.ini参数详解、MySQL性能优化

    类型:数据库类大小:1.7M语言:英文 评分:6.6 标签: 立即下载 my.ini(Linux系统下是my.cnf),当mysql服务器启动时它会读取这个文件,设置相关的运行环境参数. my.ini ...

  8. MySQL高级-MySQL并发参数调整

    Mysql并发参数调整 1 max_connections 2 back_log 3 table_open_cache 4 thread_cache_size 5 innodb_lock_wait_t ...

  9. mysql启动参数(/etc/my.cnf)详解汇总

    mysql启动参数(/etc/my.cnf)详解汇总 MYSQL–my.cnf配置中文详解 basedir = path 使用给定目录作为根目录(安装目录). character-sets-dir = ...

最新文章

  1. 用 Flask 来写个轻博客 (5) — (M)VC_SQLAlchemy 的 CRUD 详解
  2. linux 产生0~9内的随机数
  3. 二分法查找和普通查找
  4. axure元件库 文件上传_手把手教你打造一套属于产品经理自己的元件库
  5. 有前途的人工智能大数据分析相关职业:Python数据科学入门之路
  6. Java代码精简之道
  7. 复数四则运算 (15 分)
  8. Docker 快速安装 Mysql
  9. javaShop JAVA版多用户B2B2C商城源码(PC +H5+小程序+APP)
  10. 1 access中iif函数中的_在Access查询中使用IIF、Switch、Choose函数
  11. hbase版本与Hadoop版本支持关系(官方)
  12. 核心竞争力和壁垒 | 讲概念
  13. 纳德拉时代下的微软开源之路
  14. 这些NFT项目已经拍成了电影
  15. android中的所有activity间动画跳转
  16. 多实例下的定时任务如何避免重复执行——分布式定时任务
  17. BZOJ4379: [POI2015]Modernizacja autostrady
  18. 经营三类医疗器械不使用计算机,三类医疗器械计算机管理系统要求
  19. 【理解springboot自动装配原理】
  20. 实现抖音霓虹灯效果---OpenCV-Python开发指南(55)

热门文章

  1. Ventuz 分享制作内容
  2. Mapbox之sprite精灵图
  3. RTSC与XDCTools
  4. iRate快速绕坑使用
  5. [WC2005]双面棋盘,洛谷P4121,线段树分治+可撤销并查集
  6. HDFS FileSystem使用的坑
  7. 【两个例子】Tensorflow+Inception-v3训练自己的数据+分析retrain源码
  8. linux创建c文件编译错误,gcc已安装,编译其他软件时提示c编译器无法创建可执行文件...
  9. MIT CMS.300 Session 2 – PLAY GAMES 玩 与 游戏
  10. 为什么要开招投标项目启动会