Sunday, July 5, 2009

log file in MySQL DB

MySQL server log

http://dev.mysql.com/doc/refman/5.0/en/server-logs.html

The error log
Problems encountered starting, running, or stopping mysqld
log_error = [filename]

The general query log (recommended!)
Established client connections and statements received from clients
log = [filename]

The binary log
All statements that change data (also used for replication)
log_bin = [filename]

The slow query log
All queries that took more than long_query_time seconds to execute or didn't use indexes
log_slow_queries = [filename]
long_query_time = 2 (Time you think that the query takes too long)

No comments: