【實戰】mariadb審計,mariadb審計

來源:互聯網
上載者:User

【實戰】mariadb審計,mariadb審計

---建立儲存審計日誌的目錄mkdir  /usr/local/mysql/mysql_logs/auditlogchown mysql:mysql /usr/local/mysql/mysql_logs/auditlog/--2.安裝審計外掛程式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%';------3.修改mysql設定檔vi /etc/my.cnfserver_audit=FORCE_PLUS_PERMANENTserver_audit_events='CONNECT,QUERY,TABLE'server_audit_logging=ONserver_audit_incl_users=windserver_audit_file_rotate_size= 10Gserver_audit_file_path= /usr/local/mysql/mysql_logs/auditlog/server_audit.log-----4.建立測試使用者GRANT ALL PRIVILEGES ON wind.t1 TO 'wind'@'%' IDENTIFIED BY 'wind' WITH GRANT OPTION;flush privileges;

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.