mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 13:14:21 +01:00
Fix mariadb (#539)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
# Changelog
|
||||
|
||||
**Warning**: Could be that you need delete this add-on first and lost all old data. Currently we don't support database migration on update.
|
||||
## 1.1
|
||||
- Fix connection issue with 10.3.13
|
||||
|
||||
## 1.0
|
||||
- Update MariaDB to 10.3.13
|
||||
|
||||
@@ -9,5 +9,6 @@ RUN apk add --no-cache mariadb mariadb-client
|
||||
|
||||
# Copy data
|
||||
COPY run.sh /
|
||||
COPY mariadb-server.cnf /etc/my.cnf.d/
|
||||
|
||||
CMD [ "/run.sh" ]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "MariaDB",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"slug": "mariadb",
|
||||
"description": "An SQL database server",
|
||||
"url": "https://home-assistant.io/addons/mariadb/",
|
||||
|
||||
10
mariadb/mariadb-server.cnf
Normal file
10
mariadb/mariadb-server.cnf
Normal file
@@ -0,0 +1,10 @@
|
||||
|
||||
[server]
|
||||
|
||||
[mysqld]
|
||||
|
||||
datadir=/data/databases
|
||||
|
||||
[galera]
|
||||
|
||||
[mariadb]
|
||||
@@ -14,6 +14,9 @@ if [ ! -d "$MARIADB_DATA" ]; then
|
||||
mysql_install_db --user=root --datadir="$MARIADB_DATA" > /dev/null
|
||||
else
|
||||
echo "[INFO] Use exists mariadb initial system"
|
||||
mysqlcheck --no-defaults --check-upgrade --auto-repair --databases mysql --skip-write-binlog > /dev/null || true
|
||||
mysqlcheck --no-defaults --all-databases --fix-db-names --fix-table-names --skip-write-binlog > /dev/null || true
|
||||
mysqlcheck --no-defaults --check-upgrade --all-databases --auto-repair --skip-write-binlog > /dev/null || true
|
||||
fi
|
||||
|
||||
# Start mariadb
|
||||
|
||||
Reference in New Issue
Block a user