Log files in Mysql

by Selva 2008-03-14 13:52:46

Log files are imporatant one for a database,because these files are usefull for recovery of data when database crash occurs.Mysql has extensive collection of log files.
Four important log files in Mysql are:
*ERROR LOG FILE
*GENERAL QUERY LOG FILE
*BINARY LOG FILE
*SLOW QUERY LOG FILE
ERROR LOG FILE:
---------------
This file logs the error encountered during starting or running or stopping the mysql server.To enable this file we must specify it in the my.cnf or .my.ini as:
[mysqld]
--log-error=[error log filename]

GENERAL QUERY LOG FILE:
-----------------------
This logs all the queries recevied from the client.To enable this file we must specify it in the my.cnf or .my.ini as:
[mysqld]
--log-=[log filename]

BINARY LOG FILE:
----------------
This logs all the statment or query that changed the data in database.This is usefull for recovery of data and replication.To enable this file we must specify it in the my.cnf or .my.ini as:
[mysqld]
--log-bin=[binary logfile name]

SLOW QUERY LOG FILE:
--------------------
This logs the query that takes long time to execute.To enable this file we must specify it in the my.cnf or .my.ini as:
[mysqld]
--log-slow-query=[slow-query logfile name]



Tagged in:

1642
like
0
dislike
0
mail
flag

You must LOGIN to add comments