This repository has no description
304 B
19 lines
1{ pkgs, ... }:
2
3pkgs.writeScriptBin "mk_sql_pair" ''
4 #!/bin/sh
5
6 name=$1
7 password=$2
8
9 if [ $# -ne 2 ]; then
10 echo '$1=name, $2=password'
11 exit 23;
12 fi
13
14 cat <<EOF
15 create database $name;
16 create user $name;
17 grant all on $name.* to $name@'localhost' identified by '$password';
18 EOF
19''