免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2597 | 回复: 1
打印 上一主题 下一主题

不解的mysql slow log 配置 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2010-05-10 15:04 |显示全部楼层
把你的配置全部贴出来。 有的配置选项已经过期了。

论坛徽章:
0
2 [报告]
发表于 2010-05-10 15:10 |显示全部楼层
SLOW LOG,目前整的挺复杂的,因为版本的不同,写法会不同。所以你先确定你的版本是什么再说。
  1. Control the slow query log as follows:

  2.     *

  3.       Before 5.1.6, the slow query log destination is always a file. To enable the log, start mysqld with the --log-slow-queries[=file_name] option.
  4.     *

  5.       As of MySQL 5.1.6, the destination can be a file or a table, or both. Start mysqld with the --log-slow-queries[=file_name] option to enable the slow query log, and optionally use --log-output to specify the log destination (as described in Section 5.2.1, “Selecting General Query and Slow Query Log Output Destinations”).
  6.     *

  7.       As of MySQL 5.1.12, as an alternative to --log-slow-queries, use --slow_query_log[={0|1}] to specify the initial slow query log state. In this case, the default slow query log file name is used. With no argument or an argument of 1, --slow_query_log enables the log. With an argument of 0, this option disables the log.
  8.     *

  9.       As of MySQL 5.1.29, use --slow_query_log[={0|1}] to enable or disable the slow query log, and optionally --slow_query_log_file=file_name to specify a log file name. The --log-slow-queries option is deprecated.
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP