support mariadb

This commit is contained in:
2025-08-20 11:32:01 +02:00
parent 2ff413efd3
commit faedb4c80c
3 changed files with 26 additions and 2 deletions

View File

@@ -20,4 +20,14 @@ GRANT ALL PRIVILEGES ON SCHEMA public TO $username;
EOF
} | pipeto sudo -u postgres psql -f -
{
cat <<EOF
CREATE USER '$username'@'localhost' IDENTIFIED BY '$password';
CREATE DATABASE IF NOT EXISTS ${database_name} CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
GRANT ALL PRIVILEGES on ${database_name}.* to '$username'@'localhost';
EOF
} | pipeto sudo mariadb -uroot -p
log_info "created database ${database_name} with user $username"