--- Create a directory named mysqlusrlocalmysqlmysql_logsauditlog. 2. Install the audit plug-in SHOWGLOBALVARIABLESLIKEplugin_dir; INSTALLPLUGINserver_auditSONAMEserver_audit.so; SELECT * fro
--- Create the directory mkdir/usr/local/mysql/mysql_logs/auditlogchown mysql: mysql/usr/local/mysql/mysql_logs/auditlog/-- 2. INSTALL the audit plug-in show global variables like plugin_dir; install plugin server_audit SONAME server_audit.so; SELECT * fro
--- Create the directory mkdir/usr/local/mysql/mysql_logs/auditlogchown mysql: mysql/usr/local/mysql/mysql_logs/auditlog/-- 2. INSTALL the audit plug-in 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. modify the mysql configuration file vi/etc/my. cnfserver_audit = login = 'connect, QUERY, TABLE 'server _ audit_logging = login = 10Gserver_audit_file_path =/usr/local/mysql/mysql_logs/auditlog/server_audit.log ----- 4. create a test user grant all privileges on wind. t1 TO 'wind '@' % 'identified by 'wind' with grant option; flush privileges;