W3cubDocs

/MariaDB

mysql.general_log Table

The mysql.general_log table stores the contents of the General Query Log if general logging is active and the output is being written to table (see Writing logs into tables).

It contains the following fields:

Field Type Null Key Default Description
event_time timestamp(6) NO CURRENT_TIMESTAMP(6) Time the query was executed.
user_host mediumtext NO NULL User and host combination.
thread_id int(11) NO NULL Thread id.
server_id int(10) unsigned NO NULL Server id.
command_type varchar(64) NO NULL Type of command.
argument mediumtext NO NULL Full query.

Example

SELECT * FROM mysql.general_log\G
*************************** 1. row ***************************
  event_time: 2014-11-11 08:40:04.117177
   user_host: root[root] @ localhost []
   thread_id: 74
   server_id: 1
command_type: Query
    argument: SELECT * FROM test.s
*************************** 2. row ***************************
  event_time: 2014-11-11 08:40:10.501131
   user_host: root[root] @ localhost []
   thread_id: 74
   server_id: 1
command_type: Query
    argument: SELECT * FROM mysql.general_log
...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.

© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/mysqlgeneral_log-table/