Skip to content

Instantly share code, notes, and snippets.

@aliuosio
Last active July 12, 2018 10:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aliuosio/00eafbe25251a30b079c8c0d7dd305e3 to your computer and use it in GitHub Desktop.
Save aliuosio/00eafbe25251a30b079c8c0d7dd305e3 to your computer and use it in GitHub Desktop.
MySQL Query Logging
# log MySQl Queries
# in file /etc/mysql/my.cnf
general_log = 1
log_output = table
-- Get Insert Statements
SELECT argument FROM general_log WHERE command_type = 'Query' AND argument LIKE '%UPDATE%' OR argument LIKE '%INSERT%';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment