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
This commit is contained in:
iangregory
2020-07-14 16:31:05 +01:00
committed by GitHub
parent 55bd6ede4d
commit 014774af6f
3 changed files with 5 additions and 3 deletions

View File

@@ -1,4 +1,6 @@
# Changelog # Changelog
## 2.2.1
- Don't delete the mariadb.sys user, it's needed in MariaDB >= 10.4.13
## 2.2.0 ## 2.2.0

View File

@@ -1,6 +1,6 @@
{ {
"name": "MariaDB", "name": "MariaDB",
"version": "2.2.0", "version": "2.2.1",
"slug": "mariadb", "slug": "mariadb",
"description": "An SQL database server", "description": "An SQL database server",
"url": "https://github.com/home-assistant/hassio-addons/tree/master/mariadb", "url": "https://github.com/home-assistant/hassio-addons/tree/master/mariadb",

View File

@@ -45,12 +45,12 @@ if bashio::var.true "${NEW_INSTALL}"; then
DELETE FROM DELETE FROM
mysql.user mysql.user
WHERE 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'); OR host NOT IN ('localhost');
DELETE FROM DELETE FROM
mysql.proxies_priv mysql.proxies_priv
WHERE 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'); OR host NOT IN ('localhost');
DROP DATABASE IF EXISTS test; DROP DATABASE IF EXISTS test;
FLUSH PRIVILEGES; FLUSH PRIVILEGES;