In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces the relevant knowledge of "what is the meaning of MYSQL audit". In the operation of actual cases, many people will encounter such a dilemma. Next, let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
MYSQL audit is actually related to his version, here our MYSQL audit is only for the Percona version, as for other versions you may need to check, of course, the official version of the audit plug-in percona can also try.
The following command installs the monitoring plug-in for percona's audit
INSTALL PLUGIN audit_log SONAME 'audit_log.so'
Here are the parameters that audit can provision
Tell me about the key parameters.
Audit_log_buffer_size configuration: buffering the data to be recorded when using audit to reduce the system Icano problems caused by write pressure.
Audit_log_strategy configuration: the strategy of writing disk when using buffering
ASYNCHRONOUS, write asynchronously, first write buffer before brushing to disk
PERFORMANCE, asynchronous performance mode. If the buffer is full but not brushed to disk, some logs will be discarded.
SEMISYNCHRONOUS, which uses system buffering to write semi-synchronously
SYNCHRONOUS, which calls sync () after each request, is the most performance-consuming way
The above figure shows some of the basic configurations in audit.
Let's do something next.
Audit log content
It contains the type of log recorded, the date on which the command was executed, the type of command, the account executed, the specific command, the IP address accessed, and so on.
The information is relatively complete, and you can also filter some databases or users that you don't want to monitor.
There are two formats you can choose to deal with CSV or JSON, and it is important to note that AUDIT will record your actions even if the command fails on the database side.
The audit log is not completely cost-free, but it is much smaller than enabling general_log to record all and each query. These are quick benchmark results, and more tests are needed to get more accurate measurement results.
Here are some explanations of the parameters
Server_audit_file_rotate_size: limit the size of log files
Server_audit_file_rotations: specify the number of log files. If 0, the log will never be rotated.
Server_audit_file_rotate_now: force log file rotation
Server_audit_incl_users: specifies which users' activities will be recorded. Connect will not be affected by this variable, which has a higher priority than server_audit_excl_users.
Server_audit_syslog_facility: default is LOG_USER, specify facility
Server_audit_syslog_ident: set ident as part of each syslog record
Server_audit_syslog_info: the specified info string will be added to the syslog record
Server_audit_syslog_priority: defines the syslogd priority for logging
Server_audit_excl_users: the user behavior of this list will not be recorded and connect will not be affected by this setting
This is the end of the content of "what is the meaning of MYSQL audit"? thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.