From 0f6b77d4c3f02e1274fb06347f01defc05662b95 Mon Sep 17 00:00:00 2001 From: Tom J Nowell Date: Mon, 28 Oct 2024 18:07:04 +0000 Subject: [PATCH] flush mariadb privs to load grants before modifying them --- provision/core/mariadb/provision.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/provision/core/mariadb/provision.sh b/provision/core/mariadb/provision.sh index faeaab699..74301b43a 100644 --- a/provision/core/mariadb/provision.sh +++ b/provision/core/mariadb/provision.sh @@ -92,8 +92,9 @@ SQL # give the safemode server a chance to start, sleep 1 sql=$( cat <<-SQL - ALTER USER 'root'@'localhost' IDENTIFIED BY 'root'; - FLUSH PRIVILEGES; + FLUSH PRIVILEGES; + ALTER USER 'root'@'localhost' IDENTIFIED BY 'root'; + FLUSH PRIVILEGES; SQL ) mysql -u root -e "${sql}"