Skip to content

Commit 9c3db19

Browse files
authored
Merge pull request #84 from linuxserver/alpine-new-installs
Fix new installs
2 parents a5ba1e6 + ad811cd commit 9c3db19

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ Find us at:
4040
[![LSIO CI](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=CI&query=CI&url=https%3A%2F%2Fci-tests.linuxserver.io%2Flinuxserver%2Fmariadb%2Flatest%2Fci-status.yml)](https://ci-tests.linuxserver.io/linuxserver/mariadb/latest/index.html)
4141

4242
[Mariadb](https://mariadb.org/) is one of the most popular database servers. Made by the original developers of MySQL.
43+
4344
[![mariadb](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/mariadb-git.png)](https://mariadb.org/)
4445

4546
## Supported Architectures
@@ -285,6 +286,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
285286

286287
## Versions
287288

289+
* **08.02.21:** - Fix new installs.
288290
* **08.02.21:** - Rebase to alpine. Add mariadb-backup.
289291
* **27.10.19:** - Bump to 10.4, ability use custom sql on initial init ,defining root passwords via file.
290292
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ app_setup_block: |
9797
9898
# changelog
9999
changelogs:
100+
- { date: "08.02.21:", desc: "Fix new installs." }
100101
- { date: "08.02.21:", desc: "Rebase to alpine. Add mariadb-backup." }
101102
- { date: "27.10.19:", desc: "Bump to 10.4, ability use custom sql on initial init ,defining root passwords via file." }
102103
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }

root/etc/cont-init.d/40-initialise-db

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ fi
2323

2424
# set basic sql command
2525
tempSqlFile=$(mktemp)
26-
chown -R abc:abc "${tempSqlFile}"
2726
cat > "${tempSqlFile}" <<-EOSQL
2827
DELETE FROM mysql.user WHERE user <> 'mariadb.sys';
2928
EOSQL
@@ -74,6 +73,7 @@ GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;
7473
DROP DATABASE IF EXISTS test ;
7574
$MYSQL_DB_SETUP
7675
EONEWSQL
76+
chown -R abc:abc "${tempSqlFile}"
7777
echo "Setting Up Initial Databases"
7878

7979
# add all sql from a user defined directory on first init
@@ -95,7 +95,7 @@ chown -R abc:abc /config/log/mysql /var/run/mysqld /var/lib/mysql
9595
chmod -R 777 /config/log/mysql /var/run/mysqld /var/lib/mysql
9696

9797
# initialise database structure
98-
mysql_install_db --datadir="${DATADIR}" --user=abc
98+
mysql_install_db --datadir="${DATADIR}" --user=abc --auth-root-authentication-method=normal
9999

100100
# start mysql and apply our sql commands we set above
101101
start_mysql

0 commit comments

Comments
 (0)