Files
notes/Databases/SurrealDB/SurrealDB.md

1.0 KiB

  1. Pull down and run Docker image with the following command on your local computer (this example is running Linux):
docker run --rm --pull always -p 8000:8000  surrealdb/surrealdb:latest start
 --user root --pass root
  • Note that this stores SurrealDB's data in memory so that when the container is shutdown, your data is gone! Run this Docker command to persist your data:
docker run --rm --pull always -p 8000:8000 -v /home/wyatt/Source/TriviaDb/:/mydata surrealdb/surrealdb:latest start
 --user root --pass root file:/mydata/database.db
  1. Note the following down:
    1. Namespace: test
    2. Database: test
    3. User: root
    4. Password: root
  2. Enter Surrealist (SurrealDB manager) and add new session
  3. Enter the following in the "Create Session" modal:
    1. Name of your session (could be literally anything)
    2. http://localhost:8000 as your Endpoint URL
    3. Authentication Method should be "Root Authentication"
    4. Namespace given
    5. Database given
    6. User given
    7. Password given
  4. Clicking on "Save details" should get you connected!