bilean/tools/bilean-db-recreate
2016-01-08 04:48:59 -05:00

17 lines
315 B
Bash
Executable File

#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` <MYSQL_PASSWORD>"
exit
fi
MYSQL_PASSWORD=$1
echo "Recreating 'bilean' database."
cat << EOF | mysql -u root --password=${MYSQL_PASSWORD}
DROP DATABASE IF EXISTS bilean;
CREATE DATABASE bilean DEFAULT CHARACTER SET utf8;
EOF
bilean-manage db_sync