aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorStephen Finucane <stephen.finucane@intel.com>2016-02-10 19:41:55 +0000
committerStephen Finucane <stephen.finucane@intel.com>2016-02-10 20:12:39 +0000
commitef2df3fb71488a8429e09981807612a09c96e55f (patch)
tree11150cc515bd29b1f79dd835b528148b84286281 /docs
parent6d9417e2bea2c39a165e54c3b2db8ae4a2d3c8f5 (diff)
downloadpatchwork-ef2df3fb71488a8429e09981807612a09c96e55f.tar
patchwork-ef2df3fb71488a8429e09981807612a09c96e55f.tar.gz
docs: Combine MySQL init/reinit instructions
Apply some learnings for the Vagrant work and combine the commands used to configure a MySQL database for first time use with those used to reset an existing database. This should simplify installation. Signed-off-by: Stephen Finucane <stephen.finucane@intel.com>
Diffstat (limited to 'docs')
-rw-r--r--docs/development.md17
1 files changed, 5 insertions, 12 deletions
diff --git a/docs/development.md b/docs/development.md
index 8b46969..54b65e7 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -137,21 +137,14 @@ To begin, export your database credentials as follows:
Now, create the database. If this is your first time configuring the database,
you must create a `patchwork` user (or similar) along with the database
-instance itself. You can do this like so:
+instance itself. The commands below will do this, dropping existing databases
+if necessary:
(.venv)$ mysql -u$db_user -p$db_pass << EOF
+ DROP DATABASE IF EXISTS patchwork;
CREATE DATABASE patchwork CHARACTER SET utf8;
- CREATE USER 'patchwork'@'localhost' IDENTIFIED BY 'password';
- GRANT ALL PRIVILEGES ON patchwork.* TO 'patchwork'@'localhost';
- EOF
-
-If you're resetting your database instead, then you must drop the existing
-database and recreate it. You can do this like so:
-
- (.venv)$ mysql -u$db_user -p$db_pass << EOF
- DROP DATABASE patchwork;
- CREATE DATABASE patchwork CHARACTER SET utf8;
- GRANT ALL PRIVILEGES ON patchwork.* TO 'patchwork'@'localhost';
+ GRANT ALL PRIVILEGES ON patchwork.* TO 'patchwork'@'localhost'
+ IDENTIFIED BY 'password';
EOF
**NOTE:** The `patchwork` username and `password` password are the defaults