码迷,mamicode.com
首页 > 数据库 > 详细

How to see log files in MySQL?

时间:2021-02-20 12:19:06      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:tps   word   tor   opera   tac   lang   str   dex   not   

原文链接: https://stackoverflow.com/questions/5441972/how-to-see-log-files-in-mysql

 

To enable error log add following

[mysqld_safe]
log_error=/var/log/mysql/mysql_error.log

[mysqld]
log_error=/var/log/mysql/mysql_error.log

To enable general query log add following

general_log_file        = /var/log/mysql/mysql.log
general_log             = 1

To enable Slow Query Log add following

log_slow_queries       = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes

How to see log files in MySQL?

标签:tps   word   tor   opera   tac   lang   str   dex   not   

原文地址:https://www.cnblogs.com/oxsir/p/14417538.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!