0

I'm trying to change the format of the general log file generated by MySQL 5.1.73.

the actual timestamp format for "event_time is:

"210909 10:32:12 12 Connect user@localhost on database"

Is there a possibility for changing its timestamp format ?

I would like the format to follow the format: 2015-04-14 22:52:11 or even containing the timezone following the RFC 3339. "1937-01-01T12:00:27.87+00:2" (UTC)

  • https://stackoverflow.com/questions/37125187/format-mysql-query-log-date – RiggsFolly Sep 09 '21 at 10:17
  • @basha04 Thats why i posted it as a **comment** not an answer and didnt use it to close the question as a duplicate :) just offered it as information! But now you mention it changing the timezone does not answer the question either and if you check the documentation for `MySQL 5.1.73` that version does not have the `log_timestamps` parameter, it was not yet thought of :) – RiggsFolly Sep 09 '21 at 11:00

1 Answers1

0

I found a solution by adding the mysql-general.log file as inputFile in rsyslog. Applying a template allow me to rewrite the log with a correct timestamp format.

Thanks for your replies / comments