|
|
Log files in Mysql - Mysql
|
Views : 623
|
|
Tagged in : Mysql
|
|
|
Report This Scrap as Inappropriate We request you to choose the appropriate categroy and subcategory that suits your
objectionable concern about the scrap, So that our team can review and find out whether it violates our Guidelines or the
scrap is not suitable for all viewers.
|
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]
|
|
By Selva, On - 2008-03-14 |
|
|
|