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
```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
```

View File

@ -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