From ea9bb2187855c784d87a7baa536df95d6955ce63 Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Wed, 22 Aug 2018 14:26:40 -0700 Subject: [PATCH] Added reset-db Signed-off-by: James Ketrenos --- reset-db.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 reset-db.sh diff --git a/reset-db.sh b/reset-db.sh new file mode 100755 index 0000000..68999ce --- /dev/null +++ b/reset-db.sh @@ -0,0 +1,10 @@ +#!/bin/bash +U='photos' +P='p4$$w0rd' +D='photos' +mysql -u root --password=${PASSWORD} << EOF +DROP DATABASE IF EXISTS ${D}; +CREATE DATABASE ${D} CHARACTER SET utf8 COLLATE utf8_general_ci; +GRANT ALL PRIVILEGES ON ${D}.* TO '${U}'@'localhost' IDENTIFIED BY '${P}'; +EOF +