Monday, July 9, 2012

MYSQL SERVER LOGS

The Error Log
 The Error log contains user-defined events and certain system events. Also you can troubleshoot your mysql server if there is a problem related to it.  When you start your mysql using mysql-noinstall the error log is also running. The error log contains the error that present in your databases. You can save your error log in your C:\WINDOWS\my.ini [log = filename.log]. And when you shutdown your databases, the error log is also shutting down.
The General Query Log
The General Query Log serves as the keeper of the mysqld. This is the general record of what mysqld is doing. Every time we connect or disconnect the mysqld, the server writes information and it logs the SQL statements. It is very useful because when you suspect an error and want to know the exactly details of what the client sent, the general query log can show the record. You can save your error log in your C:\WINDOWS\my.ini [log-error = filename.log].
Binary Log
The Binary log includes the events that describe the changes in database such as the tables. Also it describes the changes in the sql statements which we used. The binary log also contains information about how long each statement took that updated data. The binary log is not used for statements such as SELECT or SHOW that do not modify data. If you want to log all statements, use the general query log. You can save your error log in your C:\WINDOWS\my.ini [log-bin = filename.log].
The Slow Query Log
The slow query log took the sql statement more than the long query time which is the default value is 10. When you begin mysqld, the minimum is zero but the priority is 1 and the value for this variable must be integer. You can save your slow query log in C:\WINDOWS\my.ini [log-slow-queries=file_name.log]. As you start the mysqld it also start and when you stop the mysqld it also stop. 

No comments:

Post a Comment