Chapter 11. Server Logs

Table of Contents

Introduction
Error Log
Slow Log
General Log

Introduction

For all tabs in this section, the working area is split into two boxes. Above the boxes, there is a bar which allows you to navigate through the log files when those have many entries. Clicking in that bar will display only part of that big logfile. Clicking on the left end of the bar will show the very first log file entries, while clicking on the right end will show the very last lines of the log file.

Figure 11.1. Displaying entries from the middle of the General Log

Displaying entries from the middle of the General Log

Note that you can view log files that are stored on the machine where MySQL Administrator is running only. At the moment, you cannot view log files of a MySQL server that is running on another machine, unless those happen to be stored on the machine where MySQL Administrator is running (which is rather unlikely). [SH] Mike: True?

Also note that some tabs may be disabled. This may be due to the before mentioned reason, but it may also mean that the log file in question has not been enabled on the MySQL server you are connected to. You can enable the various log files in the Startup Variables section.

While the right box displays the complete contents of the log file selected, in exactly the same format that the log file uses, the left box provides information about the most important events, in a format that is easier to read. In the right box, you might, for example, see something like this:

    040105 12:30:07 InnoDB: Started
   

That same information would be displayed in the left box like this:

    05 Jan 12:30   InnoDB Startup
   

Clicking on an event in the left box will jump to the corresponding log file entry in the right box.

Each tab has three buttons:

  • Search opens a dialog where you can specify a search term to look for in the log file. If it's found, it will be marked as selected in the right box. This command is available by right-clicking in the right box, too.

  • Save Log Page opens a dialog that allows you to specify the path and file name where the log file should be stored. By default, MySQL Administrator suggests ErrorLog.txt, SlowLog.txt, or GeneralLog.txt as a filename. Note that executing that command does not affect the actual log file in any way; it just creates a copy of the current log file contents that you may store for documenting or analysis purposes. This command is available by right-clicking in the right box, too.

  • Refresh will reload the log files.