Skip to content

Commit 5754704

Browse files
committed
smt-db always create DB user if it doesn't exist
Newer version of mariadb no longer implicitly create db user using grant statement. For that, create db user if it doesn't exist before granting database permission (bsc#1228604).
1 parent 2b2659b commit 5754704

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

db/smt-db

+2
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ sub setup
302302
return 7;
303303
}
304304

305+
$r = $dbh->do("create user if not exists '$smtuser'\@$host");
306+
305307
$r = $dbh->do("grant all on smt.* to '$smtuser'\@$host identified by '$smtpass'");
306308
$dbh->disconnect;
307309

0 commit comments

Comments
 (0)