To enable this feature, login to MySQL as root. At the MySQL prompt, type this:
mysql> SET GLOBAL log_output = 'TABLE';
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
Double check if it's really been turned on:
mysql> select @@global.general_log;
+----------------------+
| @@global.general_log |
+----------------------+
| 1 |
+----------------------+
1 row in set (0.00 sec)
The value should read '1'. You can now see all SQL queries logged in the general_log table in the mysql database.
To turn off the logging, set the general_log to OFF using the same syntax as above.
No comments:
Post a Comment