From cfb58cd2649670c411248173d18812c61885d81c Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Mon, 15 Jan 2018 17:34:55 -0800 Subject: [PATCH] Added info on creating users for app Signed-off-by: James Ketrenos --- README.md | 16 ++++++++++------ config/default.json | 6 ++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 34d5a78..494b145 100644 --- a/README.md +++ b/README.md @@ -25,18 +25,22 @@ for the photo app via: ### Create the USER ```bash -U=photos -P=p4$$w0rd +U='photos' +P='p4$$w0rd' mysql -u root --password=${PASSWORD} << EOF -GRANT ALL PRIVILEGES ON *.* TO '${U}'@'localhost' IDENTIFIED BY '${P}'; +CREATE USER '${U}'@'localhost' IDENTIFIED BY '${P}'; EOF ``` +### Create the DB 'photos' + ```bash -D=photos -mysql -u ${U} --password=${P} << EOF +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 ``` - diff --git a/config/default.json b/config/default.json index bc36635..92a8ad1 100644 --- a/config/default.json +++ b/config/default.json @@ -1,7 +1,9 @@ { "db": { - "host": "mysql://photos:p4$$w0rd@localhost/photos", - "options": {} + "host": "mysql://photos:p4$$w0rd@localhost:3306/photos", + "options": { + "logging" : false + } }, "server": { "port": 8080