Skip to content
Snippets Groups Projects
Commit e459aee9 authored by jurgenhaas's avatar jurgenhaas
Browse files

Adjust config for replication

Add netdata user to database
parent 3f7acb22
No related branches found
No related tags found
No related merge requests found
...@@ -37,3 +37,10 @@ ...@@ -37,3 +37,10 @@
with_items: '{{ mysql_external_users|default([]) }}' with_items: '{{ mysql_external_users|default([]) }}'
notify: notify:
- Restart MySQL - Restart MySQL
- name: Add netdata user
mysql_user:
user: netdata
host: localhost
check_implicit_admin: yes
priv: '*.*:USAGE,REPLICATION CLIENT,PROCESS'
...@@ -21,28 +21,28 @@ ...@@ -21,28 +21,28 @@
# The following values assume you have at least 32M ram # The following values assume you have at least 32M ram
[mysqld_safe] [mysqld_safe]
socket = /var/run/mysqld/mysqld.sock socket = /var/run/mysqld/mysqld.sock
nice = 0 nice = 0
[mysqld] [mysqld]
# #
# * Basic Settings # * Basic Settings
# #
user = mysql user = mysql
pid-file = /var/run/mysqld/mysqld.pid pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock socket = /var/run/mysqld/mysqld.sock
port = 3306 port = 3306
basedir = /usr basedir = /usr
datadir = /var/lib/mysql datadir = /var/lib/mysql
tmpdir = /tmp tmpdir = /tmp
lc-messages-dir = /usr/share/mysql lc-messages-dir = /usr/share/mysql
skip-external-locking skip-external-locking
# skip-name-resolve # skip-name-resolve
explicit_defaults_for_timestamp = 1 explicit_defaults_for_timestamp = 1
# #
# Instead of skip-networking the default is now to listen only on # Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure. # localhost which is more compatible and is not less secure.
bind-address = {{ mysql_bind }} bind-address = {{ mysql_bind }}
# #
# * Fine Tuning # * Fine Tuning
# #
...@@ -93,12 +93,16 @@ slow_query_log_file = /var/log/mysql/slow.log ...@@ -93,12 +93,16 @@ slow_query_log_file = /var/log/mysql/slow.log
# The following can be used as easy to replay backup logs or for replication. # The following can be used as easy to replay backup logs or for replication.
# note: if you are setting up a replication secondary, see README.Debian about # note: if you are setting up a replication secondary, see README.Debian about
# other settings you may need to change. # other settings you may need to change.
#server-id = 1 {% if mysql_repl_primary or mysql_repl_secondary %}
#log_bin = /var/log/mysql/mysql-bin.log server-id = {{ mysql_server_id }}
expire_logs_days = {{ mysql_expire_logs_days }} {% endif %}
max_binlog_size = {{ mysql_max_binlog_size }} {% if mysql_repl_primary %}
#binlog_do_db = include_database_name log_bin = /var/log/mysql/mysql-bin.log
#binlog_ignore_db = include_database_name expire_logs_days = {{ mysql_expire_logs_days }}
max_binlog_size = {{ mysql_max_binlog_size }}
# binlog_do_db = THIS IS UNSET, LOG EVERYTHING EXCEPT binlog_ignore_db
binlog_ignore_db = manual,mysql
{% endif %}
# #
# * InnoDB # * InnoDB
# #
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment