First page Back Continue Last page Image

Writing a SELECT Statement to view Log files

SELECT *, CHAR(argument) AS argument_text FROM log-name-goes-here

SELECT *, CHAR(argument) AS argument_text FROM mysql.general_log

The general syntax for displaying the contents of a log file from inside MySQL is shown here:

Here is an example, with the results

Note: You will not get any results until you turn the log on