Skip to content

Instantly share code, notes, and snippets.

@vadviktor
Created October 3, 2014 08:50
Show Gist options
  • Select an option

  • Save vadviktor/38f9a69051a76560de92 to your computer and use it in GitHub Desktop.

Select an option

Save vadviktor/38f9a69051a76560de92 to your computer and use it in GitHub Desktop.
Tail mysql log with syntax highlight
sudo tail -n +4 -f /var/log/mysql/mysql.log | sed -u -e 's/^.\+Query\t//' -e '/^.\+Connect\t/d' -e '/^.\+Quit\t/d' | source-highlight -fesc -ssql -oSTDOUT
@vadviktor
Copy link
Author

tail -f /var/log/mysql/mysql.log | source-highlight -f esc -s sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment