40.2. Using the Error Log for Diagnostic Purposes


MySQL Server writes diagnostic information to an error log as a record of incidents that are not part of normal operation. It also logs messages to indicate when it starts and stops.

Normally, it's desirable for the error log to be as short as possible. Even the presence of start and stop messages might indicate a problem, if the number of them suggests that the server has been restarting unexpectedly and not due to administrative action or system startup and shutdown.

Other messages besides the start and stop indicators provide you with information about problems that the server encounters as it runs:

  • Unrecognized startup options. If the server attempts to start up but quits almost immediately, the error log can tell you why. When the server fails to complete its initialization phase, it writes information to the log. A common reason for error messages is that there is a misconfiguration that must be addressed. For example, you might have a bad option listed in an option file.

  • Failure of the server to open its network interfaces: the TCP/IP port, the Windows named pipe, Windows shared memory, or the Unix socket file. The server cannot use an interface that already is in use by another server.

  • Storage engine initialization failure. This might occur due to incorrect configuration of the storage engine (for example, if a file specified as part of the InnoDB tablespace cannot be opened), or detection of conditions that make it impossible to continue (for example, if a storage engine detects table corruption but cannot correct it automatically).

  • Failure to find SSL certificate or key files that are named by startup options.

  • Inability of the server to change its user ID on Unix. This can happen if you specify a --user option but do not start the server as root so that it can relinquish root privileges and change to a different user.

  • Problems related to replication.

Normally, the error log can be found, if it is enabled, in the server's data directory. Configuration options for enabling it and specifying its name and location are provided in Chapter 24, "Starting, Stopping, and Configuring MySQL."



MySQL 5 Certification Study Guide
MySQL 5.0 Certification Study Guide
ISBN: 0672328127
EAN: 2147483647
Year: 2006
Pages: 312

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net