How to see log files in MySQL?

原文链接: https://*.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
上一篇:2013年上半年 系统分析师 上午试卷 综合知识 软考真题【含答案和答案解析】


下一篇:机器学习理论基础学习3.1--- Linear classification 线性分类之感知机PLA(Percetron Learning Algorithm)