cat ~/.mysql_history
Save history to database table:
SET GLOBAL log_output = 'TABLE';
SET GLOBAL general_log = 'ON';
- SELECT * FROMĀ
mysql.general_log
;
Save history to file:
SET GLOBAL log_output = "FILE";
SET GLOBAL general_log_file = "/tmp/mysql_query.log"
SET GLOBAL general_log = 'ON';
- tail
/tmp/mysql_query.log