Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Slowroll:Base:1
warewulf
common-Create-database-user-separately-to-allow...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File common-Create-database-user-separately-to-allow-empty-password.patch of Package warewulf
From: Egbert Eich <eich@suse.com> Date: Mon Oct 4 19:49:16 2021 +0200 Subject: common: Create database user separately to allow empty password Patch-mainline: Not yet Git-commit: 3e87929be4b49584a9a3d5c51ef5eb2dc2d1792a References: Signed-off-by: Egbert Eich <eich@suse.com> --- common/libexec/wwinit/10-database.init | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/common/libexec/wwinit/10-database.init b/common/libexec/wwinit/10-database.init index 5d0626b..c58c5c0 100644 --- a/common/libexec/wwinit/10-database.init +++ b/common/libexec/wwinit/10-database.init @@ -183,10 +183,14 @@ if [ "$DATASTORE" = "mysql" ]; then fi if [ -n "$DBUSER" ] && [ "$DBUSER" != "root" ]; then - wwprint "Updating database permissions for base user" + wwprint "Creating base user if it doesn't exist" wwrun mysql $CLI_ARGS $DBNAME <<- END_OF_SQL - GRANT SELECT on $DBNAME.* - TO '$DBUSER'@'$DBCLIENT' IDENTIFIED BY '$DBPASS' + CREATE USER if not exists '$DBUSER'@'$DBCLIENT'; + END_OF_SQL + wwprint "Updating database permissions for base user" + wwrun mysql $CLI_ARGS $DBNAME <<- END_OF_SQL + GRANT SELECT on $DBNAME.* + TO '$DBUSER'@'$DBCLIENT' IDENTIFIED BY '$DBPASS' END_OF_SQL fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor