Skip to content

Commit

Permalink
Merge pull request #230 from Automattic/fix-mariadb-auth
Browse files Browse the repository at this point in the history
fix(mariadb): handle authentication differences in Debian-based distros
  • Loading branch information
sjinks authored Jun 2, 2024
2 parents 35e4559 + 95b51f8 commit d4f265d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion features/src/mariadb/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "MariaDB",
"id": "mariadb",
"version": "1.1.4",
"version": "1.1.5",
"description": "Sets up MariaDB into the Dev Environment",
"options": {
"installDatabaseToWorkspaces": {
Expand Down
4 changes: 4 additions & 0 deletions features/src/mariadb/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ case "${ID_LIKE}" in

if [ "${INSTALLDATABASETOWORKSPACES}" = 'true' ]; then
mv /var/lib/mysql/debian-*.flag "${MARIADB_DATADIR}"
else
# The init script will recreate the database with the correct authentication method
rm -rf /var/lib/mysql/mysql
rm -f /var/lib/mysql/aria_log* /var/lib/mysql/ib*
fi
;;

Expand Down
5 changes: 0 additions & 5 deletions features/src/mariadb/service-run.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
set -eu
exec 2>&1

if [ -f /etc/conf.d/mariadb ]; then
# shellcheck source=/dev/null
. /etc/conf.d/mariadb
fi

# shellcheck disable=SC2154
install -d -D -m 02755 -o "${MARIADB_USER}" -g "${MARIADB_USER}" "${MARIADB_DATADIR}"
chown -R "${MARIADB_USER}:${MARIADB_USER}" "${MARIADB_DATADIR}"
Expand Down

0 comments on commit d4f265d

Please sign in to comment.