From ac148795b22dabcdcb4033a9f04a54718a4b602c Mon Sep 17 00:00:00 2001 From: Stephan Tietz <1504437+stietz@users.noreply.github.com> Date: Sun, 17 Nov 2019 16:59:24 +0000 Subject: [PATCH] Updated Using the MySQL Backend (markdown) --- Using-the-MySQL-Backend.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Using-the-MySQL-Backend.md b/Using-the-MySQL-Backend.md index eae4690..553bc88 100644 --- a/Using-the-MySQL-Backend.md +++ b/Using-the-MySQL-Backend.md @@ -51,6 +51,12 @@ CREATE USER 'bitwarden_rs'@'localhost' IDENTIFIED BY 'yourpassword'; GRANT ALL ON `bitwarden_rs`.* TO 'bitwarden_rs'@'localhost'; FLUSH PRIVILEGES; ``` +You might want to try a restricted set of grants: +``` +CREATE USER 'bitwarden_rs'@'localhost' IDENTIFIED BY 'yourpassword'; +GRANT ALTER, CREATE, DELETE, DROP, INDEX, INSERT, SELECT, UPDATE ON `bitwarden_rs`.* TO 'bitwarden_rs'@'localhost'; +FLUSH PRIVILEGES; +``` 3. Configure bitwarden_rs and start it, so diesel can run migrations and set up the schema properly. Do not do anything else. 4. Stop bitwarden_rs. 5. Dump your existing SQLite database: ```sqlite3 db.sqlite3 .dump > sqlitedump.sql```