#!/bin/sh -eux db="$1" user="${2:-$1}" sudo -u mysql mysql --batch --verbose <<-EOF CALL mysql.create_database('$db', '$user', 'localhost'); EOF