Another attempt at fixing the Embedded DB Docker image (#388)

This commit is contained in:
Michael Green
2024-07-08 21:22:26 +10:00
committed by GitHub
parent ae75fc1490
commit 590a7829b1
4 changed files with 54 additions and 34 deletions

View File

@@ -1,16 +1,16 @@
#!/bin/bash
#!/bin/sh
# start the database server without network or grant tables
/usr/sbin/mariadbd --datadir=/var/lib/mysql --skip-grant-tables --skip-networking &
# wait for the server to start
sleep 2
sleep 5
# change the root password
mariadb -u root -e "FLUSH PRIVILEGES; ALTER USER 'root'@'localhost' IDENTIFIED BY '$MARIADB_ROOT_PASSWORD'; FLUSH PRIVILEGES;"
# stop the server
sleep 1
sleep 5
killall mariadbd
# start the server normally