Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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