Created
June 26, 2018 15:20
-
-
Save jaceshim/6462a2b255ee024cbeea55cca768bfa1 to your computer and use it in GitHub Desktop.
MariaDB Audit Plugin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#mariadb audit plugin 설치 | |
무중단이 가능합니다! | |
## 플러그인 directory에서 server_audit.so 확인 | |
SHOW GLOBAL VARIABLES LIKE 'plugin_dir'; | |
## 설치 | |
INSTALL PLUGIN server_audit SONAME 'server_audit.so'; | |
## 설치 확인 | |
SELECT * from information_schema.plugins where plugin_name='server_audit'; | |
## 변수 확인 | |
SHOW GLOBAL VARIABLES LIKE 'server_audit%'; | |
## 감시 action 정의 | |
SET GLOBAL server_audit_events='CONNECT,QUERY,TABLE'; | |
## log file rotate 켬 | |
SET GLOBAL server_audit_file_rotate_now = 'ON'; | |
## root 제외 (include 우선순위가 더 높음) | |
SET GLOBAL server_audit_excl_users = 'root'; | |
## audit 켬 | |
SET GLOBAL server_audit_logging=on; | |
## server_audit.log 위치 확인 | |
SHOW GLOBAL VARIABLES LIKE 'datadir%'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment