Change dbtool to create user only (and assign tablespace ownership for Postgres)
[hcoop/domtool2.git] / src / plugins / domtool-mysql
index 4fad400..657ed00 100755 (executable)
@@ -2,8 +2,11 @@
 
 case $1 in
        adduser)
 
 case $1 in
        adduser)
-               echo MySQL user was already created during create-user.
-       ;;
+               USERNAME=$2
+               PASSWORD=$3
+
+               sudo -H mysql -e "CREATE USER '$USERNAME'@'localhost' IDENTIFIED BY '$PASSWORD';"
+
        passwd)
                USERNAME=$2
                PASSWORD=$3
        passwd)
                USERNAME=$2
                PASSWORD=$3