From df1bf8e67b4cbeeadf70abe08b5a2039b967722d Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 18 Jul 2023 13:41:26 -0400 Subject: [PATCH 1/3] restart mysql container if config or pass changes --- salt/mysql/enabled.sls | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/salt/mysql/enabled.sls b/salt/mysql/enabled.sls index f9890c300..5f0bcaa01 100644 --- a/salt/mysql/enabled.sls +++ b/salt/mysql/enabled.sls @@ -61,7 +61,8 @@ so-mysql: {% endfor %} {% endif %} - watch: - - /opt/so/conf/mysql/etc + - file: mysqlcnf + - file: mysqlpass - require: - file: mysqlcnf - file: mysqlpass From b66cd8211021b75764f1ecf622693b64da74649e Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Tue, 18 Jul 2023 16:50:34 -0400 Subject: [PATCH 2/3] fix depreciations --- salt/mysql/etc/my.cnf | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/salt/mysql/etc/my.cnf b/salt/mysql/etc/my.cnf index 243cc4c51..621ce83d8 100644 --- a/salt/mysql/etc/my.cnf +++ b/salt/mysql/etc/my.cnf @@ -17,18 +17,16 @@ # join_buffer_size = 128M # sort_buffer_size = 2M # read_rnd_buffer_size = 2M -skip-host-cache + +host_cache_size=0 skip-name-resolve datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock secure-file-priv=/var/lib/mysql-files user=socore -# Disabling symbolic-links is recommended to prevent assorted security risks -symbolic-links=0 - log-error=/var/log/mysql/mysqld.log pid-file=/var/run/mysqld/mysqld.pid # Switch back to the native password module so that playbook can connect -default_authentication_plugin=mysql_native_password \ No newline at end of file +authentication_policy=mysql_native_password From 1b0c146b545a2e46e22f09dfe4bb698ade03c733 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Wed, 19 Jul 2023 09:54:00 -0400 Subject: [PATCH 3/3] get rid of mysql error: mbind: Operation not permitted --- salt/mysql/enabled.sls | 2 ++ 1 file changed, 2 insertions(+) diff --git a/salt/mysql/enabled.sls b/salt/mysql/enabled.sls index 5f0bcaa01..c23d9bcad 100644 --- a/salt/mysql/enabled.sls +++ b/salt/mysql/enabled.sls @@ -60,6 +60,8 @@ so-mysql: - {{ BIND }} {% endfor %} {% endif %} + - cap_add: + - SYS_NICE - watch: - file: mysqlcnf - file: mysqlpass