MySQL query log enable/disable

2018/08/15

1 minute read

when programming with spring data jpa, it is sometimes usefull to see what querties MySQL is processing. here is a way of doing that:

mysql

>set GLOBAL log_output = "FILE";

>set global general_log = "ON";

>set global general_log_file="/tmp/mysql.log";

now just tail the mysql.log file to see the queries that are executed.