Tuesday, July 30, 2024

.::: How to enable the MySQL/MariaDB general query logs :::.


1. enable general log temporary

SET GLOBAL general_log_file='/var/lib/mysql/general.log';
SET GLOBAL log_output = 'FILE,TABLE';
SET GLOBAL general_log = 'ON';
SET GLOBAL general_log = 1;

 

Sunday, July 14, 2024

.::: Create User Access MariaDB MySQL using PAM example OS Linux Login :::.

 
1. install pam plugin

INSTALL PLUGIN pam SONAME 'auth_pam';

MariaDB [(none)]> INSTALL PLUGIN pam SONAME 'auth_pam';
ERROR 1968 (HY000): Plugin 'pam' already installed
MariaDB [(none)]>


2. check plugin pam

show plugins
SELECT plugin_name,plugin_version,plugin_status,plugin_type,plugin_library,plugin_author FROM INFORMATION_SCHEMA.PLUGINS WHERE PLUGIN_NAME LIKE '%pam%';

Saturday, July 6, 2024

.::: Script Backup Full + Differential + Transaction Log in MariaDB MySQL & Scheduler just like SQL Server for SingleDB & MultipleDB include Restore in One File Script :::.

 
A. SingleDB

1. run script one time to full backup

sh /data/script/scriptbackup/backup_full_log_single_db.sh
 

2. run script two time to log backup

sh /data/script/scriptbackup/backup_full_log_single_db.sh

Popular Posts