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 @@
with_items: '{{ mysql_external_users|default([]) }}'
notify:
- 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 @@
# The following values assume you have at least 32M ram
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
socket = /var/run/mysqld/mysqld.sock
nice = 0
[mysqld]
#
# * Basic Settings
#
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
# skip-name-resolve
explicit_defaults_for_timestamp = 1
#
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = {{ mysql_bind }}
bind-address = {{ mysql_bind }}
#
# * Fine Tuning
#
......@@ -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.
# note: if you are setting up a replication secondary, see README.Debian about
# other settings you may need to change.
#server-id = 1
#log_bin = /var/log/mysql/mysql-bin.log
expire_logs_days = {{ mysql_expire_logs_days }}
max_binlog_size = {{ mysql_max_binlog_size }}
#binlog_do_db = include_database_name
#binlog_ignore_db = include_database_name
{% if mysql_repl_primary or mysql_repl_secondary %}
server-id = {{ mysql_server_id }}
{% endif %}
{% if mysql_repl_primary %}
log_bin = /var/log/mysql/mysql-bin.log
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
#
......
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