Several kinds of logs, this paper mainly summarize the MySQL database is used for routine maintenance in the process of problem solving and performance optimization, etc., slightly, daily accumulation.
Part of the article to the MySQL database and SQL Server database part to do a comparison, the relative merits of attack, narrative technique, only right to make using of the study.
Idle time, but it will get into this business directly.
Host in Ubuntu14.04.2 platform, based on MYSQL5.5.46 version.
Log file records the MySQL database of various kinds of activities, as one of the most commonly used daily positioning problem analysis method, that is commonly used in the MySQL database log file is divided into the following categories: the error log, binary log, slow query log, query log.
First, the error log
I remember when writing the SQL Server, I have written an article about some mistakes in the process of SQL Serverstartup log, you canClick on thisTo look at it.Also, in the process of running MySQL database, have their own database error log.
The log records the MySQL operation process in the process ofstarting, running and shut down some detail records, when once appear problem, to view the log, the log not only recorded the error message, also recorded some warning, of course, there are some information.
Can use the following command to view the error log file path:
show variables like ' log_error ' ;
By the above command location on the error log file, if a problem, can in the corresponding up and view the log Server detail, see as follows:
more / var / log /mysql /error. log
Of course, the above command in the Linux platform, generally used to modify the file, but can also be used as a view file to use.