Friday, August 23, 2024

.::: Enable collect MariaDB User login Connect & Disconnect include prviledge using MariaDB Audit :::.

1. enable MariaDB Audit

http://teguhth.blogspot.com/2022/08/enable-server-audit-in-mariadb-mysql.html

2. convert to table

http://teguhth.blogspot.com/2022/09/load-log-file-insert-into-table-in.html

3. check filter tbl_mariadb_audit to filter connect & disconnect

MariaDB [teguhthtools]> select * from tbl_mariadb_audit where type ='connect' or type ='disconnect';
+-------------------+---------+--------+-----------+------+---------------+------------+------+---------+--------+
| date              | host    | userdb | client    | id   | connection_id | type       | db   | sqltext | status |
+-------------------+---------+--------+-----------+------+---------------+------------+------+---------+--------+
| 20240822 07:52:09 | teguhth | admin  | teguhth   |    4 |             0 | CONNECT    |      |         | 0      |
| 20240822 07:52:32 | teguhth | admin  | teguhth   |    4 |             0 | DISCONNECT |      |         | 0      |
+-------------------+---------+--------+-----------+------+---------------+------------+------+---------+--------+
3 rows in set (0.001 sec)

MariaDB [teguhthtools]>

Tuesday, August 20, 2024

.::: Script Broadcast Query in EDB / PostgreSQL to Multple Database in Linux :::.


1. create database sample
create database db_klt_teguh;
create database db_klt_teguh_dmart;
create database db_klt_teguh_archive;

create database db_bgr_tri;
create database db_bgr_tri_dmart;
create database db_bgr_tri_archive;

create database db_lpg_raju;
create database db_lpg_raju_dmart;
create database db_lpg_raju_archive;

.::: Script Broadcast Query in MariaDB MySQL to Multple Database in Linux :::.

1. create database sample
create database db_klt_teguh;
create database db_klt_teguh_dmart;
create database db_klt_teguh_archive;

create database db_bgr_tri;
create database db_bgr_tri_dmart;
create database db_bgr_tri_archive;

create database db_lpg_raju;
create database db_lpg_raju_dmart;
create database db_lpg_raju_archive;

Popular Posts