更改MySQL日志错误级别记录非法登陆(Access denied)

按照MySQL官方文档可将my.ini(Microsoft Windows)或my.cnf(UNIX/Linux)中mysqld段的log-warnings设置为1以上的数字,如2,重启mysqld生效。

       Type:numeric

       Default:1

       32-bit Range:0 .. 4294967295

       64-bit Range:0 .. 18446744073709547520

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. See Section C.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. As of MySQL 5.1.38, the server logs messages about statements that are unsafe for statement-based logging if --log-warnings is greater than 0.

参考:http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_log-warnings






本文转自 urey_pp 51CTO博客,原文链接:http://blog.51cto.com/dgd2010/1395778,如需转载请自行联系原作者


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值