We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9ee33a3 commit 40cb3ebCopy full SHA for 40cb3eb
root/etc/s6-overlay/s6-rc.d/init-mariadb-initdb/run
@@ -30,7 +30,7 @@ if [[ ! -d "${DATADIR}/mysql" ]]; then
30
31
# set basic sql command
32
cat >"${tempSqlFile}" <<-EOSQL
33
-DELETE FROM mysql.user WHERE user <> 'mariadb.sys';
+DELETE FROM mysql.user WHERE user <> 'mariadb.sys' AND user <> 'root';
34
EOSQL
35
36
if [[ "${#MYSQL_ROOT_PASSWORD}" -lt "4" ]]; then
@@ -57,8 +57,6 @@ EOM
57
cat >>"${tempSqlFile}" <<-EONEWSQL
58
$MYSQL_PASS
59
GRANT ALL ON *.* TO 'root'@'%' WITH GRANT OPTION ;
60
-DROP USER 'root'@'localhost';
61
-GRANT ALL ON *.* TO 'root'@'localhost' IDENTIFIED VIA unix_socket WITH GRANT OPTION ;
62
DROP DATABASE IF EXISTS test ;
63
$MYSQL_DB_SETUP
64
EONEWSQL
0 commit comments