Added info on creating users for app

Signed-off-by: James Ketrenos <james_git@ketrenos.com>
This commit is contained in:
James Ketr 2018-01-15 17:34:55 -08:00
parent 3951ea706f
commit cfb58cd264
2 changed files with 14 additions and 8 deletions

View File

@ -25,18 +25,22 @@ for the photo app via:
### Create the USER ### Create the USER
```bash ```bash
U=photos U='photos'
P=p4$$w0rd P='p4$$w0rd'
mysql -u root --password=${PASSWORD} << EOF mysql -u root --password=${PASSWORD} << EOF
GRANT ALL PRIVILEGES ON *.* TO '${U}'@'localhost' IDENTIFIED BY '${P}'; CREATE USER '${U}'@'localhost' IDENTIFIED BY '${P}';
EOF EOF
``` ```
### Create the DB 'photos'
```bash ```bash
D=photos U='photos'
mysql -u ${U} --password=${P} << EOF P='p4$$w0rd'
D='photos'
mysql -u root --password=${PASSWORD} << EOF
DROP DATABASE IF EXISTS ${D}; DROP DATABASE IF EXISTS ${D};
CREATE DATABASE ${D} CHARACTER SET utf8 COLLATE utf8_general_ci; CREATE DATABASE ${D} CHARACTER SET utf8 COLLATE utf8_general_ci;
GRANT ALL PRIVILEGES ON ${D}.* TO '${U}'@'localhost' IDENTIFIED BY '${P}';
EOF EOF
``` ```

View File

@ -1,7 +1,9 @@
{ {
"db": { "db": {
"host": "mysql://photos:p4$$w0rd@localhost/photos", "host": "mysql://photos:p4$$w0rd@localhost:3306/photos",
"options": {} "options": {
"logging" : false
}
}, },
"server": { "server": {
"port": 8080 "port": 8080