MySQL Forums
Forum List  »  General

Re: General Log content explanation
Posted by: dHeL Cas
Date: June 26, 2017 02:36AM

Hi Peter,

Thank you for your assitance.

Below is an example of General Log that I have:
----------------
Tcp port: 3306 Unix socket: /tmp/mysql.sock
Time Id Command Argument
9 Query SELECT 1
9 Query SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2'
9 Query SELECT 1
9 Query SELECT value FROM mysql.rds_heartbeat2
12 Connect rdsadmin@localhost on
12 Statistics
12 Quit
170117 5:00:14 9 Query SELECT 1
9 Query SELECT 1
9 Query SELECT 1
9 Query SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2'
9 Query SELECT 1
9 Query SELECT value FROM mysql.rds_heartbeat2
170117 5:00:29 9 Query SELECT 1
9 Query SELECT 1
9 Query SELECT 1
9 Query SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2'
9 Query SELECT 1
170117 5:00:30 9 Query SELECT value FROM mysql.rds_heartbeat2
170117 5:00:44 9 Query SELECT 1
9 Query SELECT 1
9 Query SELECT 1
9 Query SELECT count(*) from information_schema.TABLES WHERE TABLE_SCHEMA = 'mysql' AND TABLE_NAME = 'rds_heartbeat2'
------------------

I want to know who run those queries, how the "Id"(s) are rotated, maximum size of SQL statement that can be logged, etc.
In the example log, there are Queries, Connect, Statistics commands, what are the other commands that can be logged.

I'm guessing that those queries that have Id=9 was run by the user who connected with Id=9? Am I right?
What if the server has been restarted, will the Id be again back to zero or just continue the Id where it was before?
What's the proper name of that Id? is it connection id or thread id or session id?
Will the query statement be always become one line even if the actual SQL statement has multiple lines?
What is the maximum size(bytes) of SQL statement that can be logged?

If there is an official document explaining these things, could you kindly direct me to that document?

Thank you in advance.

Options: ReplyQuote


Subject
Written By
Posted
Re: General Log content explanation
June 26, 2017 02:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.