+-----------+--------------+---------------------------------------------------------------+
| thread_id | command_type | argument |
+-----------+--------------+---------------------------------------------------------------+
| 1 | Query | show variables like 'log_output' |
| 1 | Query | select * from tempdb.tb1 |
| 1 | Query | desc mysql.general_log |
| 1 | Query | select thread_id,command_type,argument from mysql.general_log |
+-----------+--------------+---------------------------------------------------------------+
root@localhost[(none)]> show variables like 'log_output';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_output | TABLE |
+---------------+-------+
--使用FILE,TABLE 2者混合输出通用日志
root@localhost[(none)]> set global log_output='file,table';
Query OK, 0 rows affected (0.00 sec)
root@localhost[(none)]> select @@global.log_output;
+---------------------+
| @@global.log_output |
+---------------------+
| FILE,TABLE |
+---------------------+
root@localhost[(none)]> insert into tempdb.tb1 values(2,'robinson');
Query OK, 1 row affected (0.06 sec)
root@localhost[(none)]> commit;
Query OK, 0 rows affected (0.01 sec)
--验证结果,表和文件里边存在通用的日志记录
root@localhost[(none)]> system tail /tmp/suse11b.log|grep robinson
141003 17:41:54 2 Query insert into tempdb.tb1 values(2,'robinson')
root@localhost[(none)]> select thread_id,command_type,argument from mysql.general_log
-> where argument like '%robinson%';