MySQL Variables log_syslog_tag 数据库 参数变量解释及正确配置使用


本站中文解释

log_syslog_tag是MySQL的一个参数变量,它可以用来在syslog中为MySQL条目指定标签,以便将其与其他系统日志条目进行区分。

要设置log_syslog_tag,您需要在my.cnf中添加:

log_syslog_tag=”[MySQL-Tag]”

官方英文解释

log_syslog_tag

Command-Line Format--log-syslog-tag=tag
System Variablelog_syslog_tag
ScopeGlobal
DynamicYes
TypeString
Default Valueempty string

The tag to be added to the server identifier in error log
output written to syslog. This variable has
no effect unless the
log_syslog system variable is
enabled. See Section 5.4.2.3, “Error Logging to the System Log”.

By default, the server identifier is mysqld
with no tag. If a tag value of tag
is specified, it is appended to the server identifier with a
leading hyphen, resulting in an identifier of
mysqld-tag.

On Windows, to use a tag that does not already exist, the
server must be run from an account with Administrator
privileges, to permit creation of a registry entry for the
tag. Elevated privileges are not required if the tag already
exists.