热搜词
发表于 2007-10-3 21:51:40 | 显示全部楼层 |阅读模式
mysql有以下几种日志: &nbsp; <BR>&nbsp; 错误日志: &nbsp; -log-err &nbsp; <BR>&nbsp; 查询日志: &nbsp; -log &nbsp; <BR>&nbsp; 慢查询日志: &nbsp; &nbsp; -log-slow-queries &nbsp; <BR>&nbsp; 更新日志: &nbsp; &nbsp; -log-update &nbsp; <BR>&nbsp; 二进制日志: &nbsp; -log-bin &nbsp; <BR>&nbsp; &nbsp; <BR>&nbsp; 在mysql的安装目录下,打开my.ini,在后面加上上面的参数,保存后重启mysql服务就行了。 &nbsp; <BR>&nbsp; 例如: &nbsp; <BR>&nbsp; #Enter &nbsp; a &nbsp; name &nbsp; for &nbsp; the &nbsp; binary &nbsp; log. &nbsp; Otherwise &nbsp; a &nbsp; default &nbsp; name &nbsp; will &nbsp; be &nbsp; used. &nbsp; <BR>&nbsp; #log-bin= &nbsp; <BR>&nbsp; #Enter &nbsp; a &nbsp; name &nbsp; for &nbsp; the &nbsp; query &nbsp; log &nbsp; file. &nbsp; Otherwise &nbsp; a &nbsp; default &nbsp; name &nbsp; will &nbsp; be &nbsp; used. &nbsp; <BR>&nbsp; #log= &nbsp; <BR>&nbsp; #Enter &nbsp; a &nbsp; name &nbsp; for &nbsp; the &nbsp; error &nbsp; log &nbsp; file. &nbsp; Otherwise &nbsp; a &nbsp; default &nbsp; name &nbsp; will &nbsp; be &nbsp; used. &nbsp; <BR>&nbsp; log-error= &nbsp; <BR>&nbsp; #Enter &nbsp; a &nbsp; name &nbsp; for &nbsp; the &nbsp; update &nbsp; log &nbsp; file. &nbsp; Otherwise &nbsp; a &nbsp; default &nbsp; name &nbsp; will &nbsp; be &nbsp; used. &nbsp; <BR>&nbsp; #log-update= &nbsp; <BR>&nbsp; &nbsp; <BR>&nbsp; 上面只开启了错误日志,要开其他的日志就把前面的“#”去掉。
全部评论0
回复
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|管理员之家 ( 苏ICP备2023053177号-2 )

GMT+8, 2024-11-23 01:10 , Processed in 0.174262 second(s), 22 queries .

Powered by Discuz! X3.5

Cpoyright © 2001-2024 Discuz! Team