Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

docs(orca-sql): create SQL users explicitly #2185

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions setup/productionize/persistence/orca-sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,20 @@ set tx_isolation = 'READ-COMMITTED';

```sql
CREATE SCHEMA `orca` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

CREATE USER
'orca_service'@'%', -- IDENTIFIED BY "password" if using password based auth
'orca_migrate'@'%'; -- IDENTIFIED BY "password" if using password based auth

GRANT
SELECT, INSERT, UPDATE, DELETE, CREATE, EXECUTE, SHOW VIEW
ON `orca`.*
TO 'orca_service'@'%'; -- IDENTIFIED BY "password" if using password based auth
TO 'orca_service'@'%';

GRANT
SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, EXECUTE, SHOW VIEW
ON `orca`.*
TO 'orca_migrate'@'%'; -- IDENTIFIED BY "password" if using password based auth
TO 'orca_migrate'@'%';
```

When Orca starts up, it will perform database migrations to ensure its running the correct schema.
Expand Down