Skip to content

Instantly share code, notes, and snippets.

@jibran
Created December 1, 2019 12:20
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 jibran/ef3d1a6cfae70b60010bb4a7ec78534f to your computer and use it in GitHub Desktop.
Save jibran/ef3d1a6cfae70b60010bb4a7ec78534f to your computer and use it in GitHub Desktop.
Enable MySQL query logging.
$ mysql -uroot -proot -h127.0.0.1 -Dlocal
MariaDB [local]> SELECT * FROM mysql.general_log;
MariaDB [local]> SET global general_log = 1;
MariaDB [local]> SET global log_output = 'table';
// Run Queries.
MariaDB [local]> SELECT * FROM mysql.general_log;
MariaDB [local]> TRUNCATE mysql.general_log;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment