Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mysql
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
mysql
Commits
e459aee9
Commit
e459aee9
authored
4 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Adjust config for replication
Add netdata user to database
parent
3f7acb22
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tasks/user.yml
+7
-0
7 additions, 0 deletions
tasks/user.yml
templates/etc-mysql-mysql-conf-d-mysqld.cnf
+21
-17
21 additions, 17 deletions
templates/etc-mysql-mysql-conf-d-mysqld.cnf
with
28 additions
and
17 deletions
tasks/user.yml
+
7
−
0
View file @
e459aee9
...
...
@@ -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'
This diff is collapsed.
Click to expand it.
templates/etc-mysql-mysql-conf-d-mysqld.cnf
+
21
−
17
View file @
e459aee9
...
...
@@ -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
#
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment