Modification : vm_{host,hosted,remote} -> {host,local,remote}/ .
[lhc/ateliers.git] / local / mysql-database-create
diff --git a/local/mysql-database-create b/local/mysql-database-create
new file mode 100755 (executable)
index 0000000..adc6ecd
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh -eux
+db="$1"
+user="${2:-$1}"
+sudo -u mysql mysql --batch --verbose <<-EOF
+       CALL mysql.create_database('$db', '$user', 'localhost');
+       EOF