lfjigu 发表于 2018-10-10 11:31:08

MySQL之MariaDB启用审计插件

# mysql -uroot -ppassword  
Welcome to the MariaDB monitor. Commands end with ; or \g.
  
Your MariaDB connection id is 42804
  
Server version: 10.0.14-MariaDB-log Source distribution
  
Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
  
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  
MariaDB [(none)]> show variables like '%audit%';
  
Empty set (0.00 sec)
  
MariaDB [(none)]> INSTALL PLUGIN server_audit SONAME 'server_audit.so'; #安装审计插件
  
Query OK, 0 rows affected (0.18 sec)
  
MariaDB [(none)]> show variables like '%audit%';
  
+-------------------------------+-----------------------+
  
| Variable_name | Value |
  
+-------------------------------+-----------------------+
  
| server_audit_events | |
  
| server_audit_excl_users | |
  
| server_audit_file_path | server_audit.log |
  
| server_audit_file_rotate_now | OFF |
  
| server_audit_file_rotate_size | 1000000 |
  
| server_audit_file_rotations | 9 |
  
| server_audit_incl_users | |
  
| server_audit_logging | OFF |
  
| server_audit_mode | 0 |
  
| server_audit_output_type | file |
  
| server_audit_syslog_facility | LOG_USER |
  
| server_audit_syslog_ident | mysql-server_auditing |
  
| server_audit_syslog_info | |
  
| server_audit_syslog_priority | LOG_INFO |
  
+-------------------------------+-----------------------+
  
14 rows in set (0.00 sec)
  
MariaDB [(none)]> SHOW VARIABLES LIKE 'plugin_dir'; #插件地址路径
  
+---------------+------------------------------ -----+
  
| Variable_name | Value |
  
+---------------+------------------------------ +
  
| plugin_dir | /usr/local/mysql/lib/plugin/ |
  
+---------------+-----------------------------------+
  
1 row in set (0.00 sec)


页: [1]
查看完整版本: MySQL之MariaDB启用审计插件