Skip to content

Commit ee832c7

Browse files
committed
https://github.com/docker-library/mariadb/pull/271
1 parent 5a3143b commit ee832c7

File tree

5 files changed

+365
-169
lines changed

5 files changed

+365
-169
lines changed

files/etc/ansible/roles/localhost/tasks/debian.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@
6969
owner: "{{ item.owner | default('root') }}"
7070
group: "{{ item.group | default('root') }}"
7171
mode: "{{ item.mode | default('0644') }}"
72+
backup: true
7273
loop:
73-
- { dest: "/etc/mysql/conf.d/mysqld.cnf" }
74+
- { dest: "/etc/mysql/my.cnf" }
7475
- { dest: "/usr/local/bin/on-start.sh", mode: "0755" }
7576
tags: localhost
7677

@@ -82,7 +83,7 @@
8283
mode: "{{ item.mode | default('0644') }}"
8384
state: "{{ item.state | default('file') }}"
8485
loop:
85-
- { dest: "/etc/mysql/conf.d/mysqld.cnf" }
86+
- { dest: "/etc/mysql/my.cnf" }
8687
- { dest: "/usr/local/bin/on-start.sh", mode: "0755" }
8788
- { dest: "/usr/local/bin/peer-finder", mode: "0755" }
8889
tags: localhost

files/etc/ansible/roles/localhost/templates/etc/mysql/conf.d/mysqld.cnf.j2

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# {{ ansible_managed }}
2+
3+
[client]
4+
default_character_set = utf8mb4
5+
port = 3306
6+
socket = /var/run/mysqld/mysqld.sock
7+
8+
[mysqld_safe]
9+
nice = 0
10+
socket = /var/run/mysqld/mysqld.sock
11+
12+
[mysqld]
13+
basedir = /usr
14+
bind_address = 0.0.0.0
15+
binlog_format = ROW
16+
binlog_row_image = MINIMAL
17+
character_set_server = utf8mb4
18+
collation_server = utf8mb4_general_ci
19+
concurrent_insert = ALWAYS
20+
connect_timeout = 5
21+
datadir = /var/lib/mysql
22+
default_storage_engine = InnoDB
23+
expire_logs_days = 10
24+
innodb_autoinc_lock_mode = 2
25+
innodb_buffer_pool_size = 128M
26+
innodb_file_per_table = 1
27+
innodb_flush_log_at_trx_commit = 2
28+
innodb_flush_method = O_DIRECT
29+
innodb_io_capacity = 512
30+
innodb_log_buffer_size = 8M
31+
innodb_open_files = 512
32+
key_buffer_size = 32M
33+
lc_messages = en_US
34+
lc_messages_dir = /usr/share/mysql
35+
log_bin = /var/log/mysql/mariadb-bin
36+
log_bin_index = /var/log/mysql/mariadb-bin.index
37+
log_error = /proc/self/fd/2
38+
log_slow_verbosity = query_plan
39+
log_warnings = 2
40+
long_query_time = 10
41+
max_allowed_packet = 128M
42+
max_binlog_size = 128M
43+
max_connections = 128
44+
max_heap_table_size = 32M
45+
pid_file = /var/run/mysqld/mysqld.pid
46+
port = 3306
47+
query_cache_limit = 8M
48+
query_cache_size = 32M
49+
read_buffer_size = 8M
50+
read_rnd_buffer_size = 8M
51+
skip_external_locking = 1
52+
skip_name_resolve = 1
53+
slow_query_log_file = /proc/self/fd/2
54+
socket = /var/run/mysqld/mysqld.sock
55+
sort_buffer_size = 8M
56+
sql_mode = NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
57+
table_open_cache = 512
58+
thread_cache_size = 256
59+
tmp_table_size = 32M
60+
tmpdir = /tmp
61+
user = mysql
62+
wait_timeout = 600
63+
64+
[galera]
65+
bind_address = 0.0.0.0
66+
binlog_format = ROW
67+
binlog_row_image = MINIMAL
68+
default_storage_engine = InnoDB
69+
innodb_autoinc_lock_mode = 2
70+
innodb_flush_log_at_trx_commit = 2
71+
wsrep_cluster_address = gcomm://
72+
wsrep_on = ON
73+
wsrep_provider = /usr/lib/galera/libgalera_smm.so
74+
wsrep_retry_autocommit = 3
75+
wsrep_sst_method = rsync
76+
77+
[mysqldump]
78+
max_allowed_packet = 128M
79+
quick
80+
quote_names
81+
82+
[mysql]
83+
84+
[isamchk]
85+
key_buffer = 128M
86+
87+
!include /etc/mysql/mariadb.cnf
88+
!includedir /etc/mysql/conf.d/

0 commit comments

Comments
 (0)