[PATCH 4/4] docs: Combine MySQL init/reinit instructions
Stephen Finucane
stephen.finucane at intel.com
Thu Feb 11 07:14:33 AEDT 2016
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 at intel.com>
---
docs/development.md | 17 +++++------------
1 file 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
--
2.0.0
More information about the Patchwork
mailing list