From 0cd30159d70a3b0bd886cd6f04af7e78236df6c7 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 19 Feb 2023 09:48:10 -0600 Subject: On mariadb --- issues/database-not-responding.gmi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'issues') diff --git a/issues/database-not-responding.gmi b/issues/database-not-responding.gmi index e842a89..8928d08 100644 --- a/issues/database-not-responding.gmi +++ b/issues/database-not-responding.gmi @@ -293,3 +293,22 @@ MariaDB [db_webqtl]> SHOW VARIABLES LIKE '%timeout%'; ``` If you set wait_timeout and interactive_timeout values they get reset after a while. + +# Monitor connections + +Use the general log as described in + +``` +ALTER TABLE mysql.general_log ENGINE = MyISAM; +ALTER TABLE mysql.general_log ADD INDEX (event_time); +SET GLOBAL general_log = 'ON'; +SET GLOBAL log_output = 'TABLE'; +``` + +and we start logging all connections and queries! Let this run for a while and we switch it off again for analysis. + +To stop logging + +``` +SET GLOBAL general_log = 'OFF'; +``` -- cgit v1.2.3