mirror of
https://github.com/aljazceru/ansible-role-mysql.git
synced 2025-12-20 19:44:21 +01:00
Make error logging configurable
This commit is contained in:
@@ -45,6 +45,11 @@ The MySQL users and their privileges. A user has the values `name`, `host` (defa
|
||||
|
||||
Default MySQL connection configuration.
|
||||
|
||||
mysql_log_error: /var/log/mysqld.log
|
||||
mysql_syslog_tag: mysqld
|
||||
|
||||
MySQL logging configuration. Setting `mysql_log_error` to `syslog` will make MySQL log to syslog using the `mysql_syslog_tag`.
|
||||
|
||||
mysql_key_buffer_size: "256M"
|
||||
mysql_max_allowed_packet: "1M"
|
||||
mysql_table_open_cache: "256"
|
||||
|
||||
@@ -44,6 +44,10 @@ mysql_innodb_lock_wait_timeout: 50
|
||||
# mysqldump settings
|
||||
mysql_mysqldump_max_allowed_packet: "64M"
|
||||
|
||||
# mysqld_safe setting
|
||||
mysql_log_error: /var/log/mysqld.log
|
||||
mysql_syslog_tag: mysqld
|
||||
|
||||
# databases and users settings
|
||||
mysql_databases: []
|
||||
mysql_users: []
|
||||
|
||||
@@ -52,5 +52,11 @@ quick
|
||||
max_allowed_packet = {{ mysql_mysqldump_max_allowed_packet }}
|
||||
|
||||
[mysqld_safe]
|
||||
log-error = /var/log/mysqld.log
|
||||
{% if mysql_log_error == 'syslog' %}
|
||||
syslog
|
||||
syslog-tag = {{ mysql_syslog_tag }}
|
||||
{% else %}
|
||||
skip-syslog
|
||||
log-error = {{ mysql_log_error }}
|
||||
{% endif %}
|
||||
pid-file = /var/run/mysqld/mysqld.pid
|
||||
|
||||
Reference in New Issue
Block a user