From 014774af6fac304a7d7557d1ffe6f7a47c822fe2 Mon Sep 17 00:00:00 2001 From: iangregory Date: Tue, 14 Jul 2020 16:31:05 +0100 Subject: [PATCH] Don't delete the mariadb.sys yser (#1450) * Don't delete the mariadb.sys yser Since 10.4.13 `mysql.user` (and probably others) have a new definer `mariadb.sys` instead of `mysql.sys` that should be added to the list of users which are retained. The Docker library has fixed their bootstrap code in https://github.com/docker-library/mariadb/pull/306 - this change applies the same fix here. * Bump version * Update CHANGELOG.md --- mariadb/CHANGELOG.md | 2 ++ mariadb/config.json | 2 +- mariadb/rootfs/etc/services.d/mariadb/run | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/mariadb/CHANGELOG.md b/mariadb/CHANGELOG.md index fed1773..888181c 100644 --- a/mariadb/CHANGELOG.md +++ b/mariadb/CHANGELOG.md @@ -1,4 +1,6 @@ # Changelog +## 2.2.1 +- Don't delete the mariadb.sys user, it's needed in MariaDB >= 10.4.13 ## 2.2.0 diff --git a/mariadb/config.json b/mariadb/config.json index 6269ab9..9059fa4 100644 --- a/mariadb/config.json +++ b/mariadb/config.json @@ -1,6 +1,6 @@ { "name": "MariaDB", - "version": "2.2.0", + "version": "2.2.1", "slug": "mariadb", "description": "An SQL database server", "url": "https://github.com/home-assistant/hassio-addons/tree/master/mariadb", diff --git a/mariadb/rootfs/etc/services.d/mariadb/run b/mariadb/rootfs/etc/services.d/mariadb/run index 19efd0c..2489d76 100644 --- a/mariadb/rootfs/etc/services.d/mariadb/run +++ b/mariadb/rootfs/etc/services.d/mariadb/run @@ -45,12 +45,12 @@ if bashio::var.true "${NEW_INSTALL}"; then DELETE FROM mysql.user WHERE - user NOT IN ('mysql.sys', 'mysqlxsys', 'root', 'mysql', 'proxies_priv') + user NOT IN ('mysql.sys', 'mariadb.sys', 'mysqlxsys', 'root', 'mysql', 'proxies_priv') OR host NOT IN ('localhost'); DELETE FROM mysql.proxies_priv WHERE - user NOT IN ('mysql.sys', 'mysqlxsys', 'root', 'mysql', 'proxies_priv') + user NOT IN ('mysql.sys', 'mariadb.sys', 'mysqlxsys', 'root', 'mysql', 'proxies_priv') OR host NOT IN ('localhost'); DROP DATABASE IF EXISTS test; FLUSH PRIVILEGES;