MySQL Error Management

Just as you can use logs in PHP to track errors, you can also do so with MySQL. There are two types of logs MySQL uses: an error log, which records problems, and a tracking log, which keeps a history of database alterations.

MySQL’s error log will be located in the data directory and titled hostname.err. Normally this will mean that the file is something like /usr/local/mysql/data/localhost.err or C:\mysql\data\mysql.err. The error log will record every error reported by the software, primarily those made when attempting to start the MySQL server.

The second type of log, an update log, will record every change made to any database. In other words, it will track all of the SQL statements that have been run that affected ...

Get PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.