summaryrefslogtreecommitdiff
path: root/replicate-db
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-02-07 12:05:38 +0100
committerErich Eckner <git@eckner.net>2019-02-07 12:05:38 +0100
commitc360fb551b49985b20757cf6ed5461f0fe390352 (patch)
tree37922bb6e975486d7cfc88aa47345d39fa14b8ea /replicate-db
parente8f4e959b46a920b798145a2482c3733526b0be9 (diff)
downloaddevops-c360fb551b49985b20757cf6ed5461f0fe390352.tar.xz
replicate-db: the options of mariadb were moved to /etc/mysql/my.cnf.d/server.cnf from /etc/mysql/my.cnf
Diffstat (limited to 'replicate-db')
-rwxr-xr-xreplicate-db13
1 files changed, 4 insertions, 9 deletions
diff --git a/replicate-db b/replicate-db
index a1327ec..bd42dc8 100755
--- a/replicate-db
+++ b/replicate-db
@@ -36,15 +36,10 @@ sudo pacman -S --noconfirm mariadb stunnel
# set up mariadb
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo sed -i '
- /myisam_sort_buffer_size/ a group_concat_max_len = 4096
- /^#server-id/ {
- s/^#//
- s/[0-9]\+$/'"$RANDOM"'/
- b
- }
- s/^server-id/#\0/
- /^#skip-networking$/ s/^#//
-' '/etc/mysql/my.cnf'
+ /^\s*\[mysqld]\s*$/ a group_concat_max_len = 4096 \
+server-id = '"$RANDOM"' \
+skip-networking
+' '/etc/mysql/my.cnf.d/server.cnf'
sudo systemctl start mysqld
sudo systemctl enable mysqld