From 79b3ec6cfb36729804813c7b6ae762891af01510 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Tue, 26 Oct 2021 07:18:51 +0200 Subject: Mariadb transaction log --- tasks/dana.gmi | 2 +- topics/systems/mariadb.gmi | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 topics/systems/mariadb.gmi diff --git a/tasks/dana.gmi b/tasks/dana.gmi index cb8ac2f..af053b7 100644 --- a/tasks/dana.gmi +++ b/tasks/dana.gmi @@ -8,7 +8,7 @@ * [X] Tux02 https firewalling * [ ] Octopus 10Gbs switch + cables -* [ ] 4TB SSDs for Tux01 and Tux02 +* [ ] Mount 4TB SSDs for Tux01 and Tux02 => ../topics/systems/decommission-machines.gmi ## Info diff --git a/topics/systems/mariadb.gmi b/topics/systems/mariadb.gmi new file mode 100644 index 0000000..c2c927b --- /dev/null +++ b/topics/systems/mariadb.gmi @@ -0,0 +1,35 @@ +# MariaDB + +Here we capture some common actions + +## Tags + +* info + +## Check the transaction logs + +Start the client and: + +``` +MariaDB [db_webqtl]> show binary logs; ++-----------------------+-----------+ +| Log_name | File_size | ++-----------------------+-----------+ +| gn0-binary-log.000012 | 374532448 | +| gn0-binary-log.000013 | 933672549 | +| gn0-binary-log.000014 | 12774545 | ++-----------------------+-----------+ +3 rows in set (0.001 sec) +``` + +To get a log + +``` +mysql -p -u webqtlout db_webqtl -e "SHOW BINLOG EVENTS IN 'gn0-binary-log.000014';" +``` + +To get a log with some stuff filtered out try + +``` +mysql -p -u webqtlout db_webqtl -e "SHOW BINLOG EVENTS IN 'gn0-binary-log.000014';" -r -s |grep -v -e "Access\|GTID\|INSERT_ID\|COMMIT\|Temp\|lastlogin\|LITERA\|flush\|ROLLBACK" +``` -- cgit v1.2.3