Testing: Difference between revisions

Jump to navigation Jump to search
133 bytes added ,  16 March 2012
m
Line 63: Line 63:
** error.log - record when the apache service restarted/stopped
** error.log - record when the apache service restarted/stopped


* [http://dev.mysql.com/doc/refman/5.1/en/server-logs.html MySQL Server Logs]: enable logging /var/log/mysql.log (location was set up in the configuration file /etc/my.cnf or my.ini) and restart MySQL service
* [http://dev.mysql.com/doc/refman/5.1/en/server-logs.html MySQL Server Logs]: enable logging /var/log/mysql.log (location was set up in the configuration file /etc/my.cnf or my.ini) and restart MySQL service<ref>[http://blog.longwin.com.tw/2005/10/mysql_query_slow_find/ 找出 MySQL 哪些 Query 速度較慢 | Tsung's Blog]</ref>
<pre>
<pre>
general_log = 1
[mysqld]
general_log_file="general_log_file.log"
log-error=/var/log/mysql/error.log
slow_query_log = 1
log-slow-queries = /var/log/mysql/mysql-slow.log
slow_query_log_file="slow_query_log_file.log"
long_query_time = 5
log-long-format
</pre>
</pre>


Navigation menu