GithubHelp home page GithubHelp logo

Comments (4)

spookyvision avatar spookyvision commented on September 26, 2024 1

you need to tell Docker to attach an interactive termina

of course, silly me. Might be worth a sentence in the docs but yeah, in retrospect it's obvious :) closing.

from surrealdb.

naisofly avatar naisofly commented on September 26, 2024

@spookyvision, If you have docker running first and are then following the steps in the docs on Run with Docker, this should work for you.

Can you kindly confirm you have

  1. Docker Running
  2. Run the steps mentioned in the docs above?

from surrealdb.

spookyvision avatar spookyvision commented on September 26, 2024

I can confirm it's not an issue of the docker db not running or a wrong connection parameter, because then I get this instead (using -e to force an invalid endpoint):

❯ docker run --rm --net=host --pull always surrealdb/surrealdb:latest sql --namespace demo --database demo -e 'ws://localhost:12345'
latest: Pulling from surrealdb/surrealdb
Digest: sha256:bc6d4b37fc79b8e4e93ab5630862e5211668a10a3302bad23bdc27a415b782f2
Status: Image is up to date for surrealdb/surrealdb:latest
2024-05-24T17:56:31.409609Z ERROR surreal::cli: There was a problem with the database: There was an error processing a remote WS request: IO error: Connection refused (os error 111)

To further clarify: I get the same buggy "instant quit" behavior whether I supply no -e parameter at all, or the assumed default -e ws://localhost:8000, where the DB is running.

I can also use the database from both the python and Rust SDKs fine.
Do I have to add authentication for the REPL to work? (that would surprise me, but I can surely give it a try)

from surrealdb.

goosethedev avatar goosethedev commented on September 26, 2024

To use the REPL with the sql command, you need to tell Docker to attach an interactive terminal after running the container. Try doing docker run -it .... Also check docker run --help for details on the -i and -t options.

The REPL itself doesn't need auth AFAIK but you won't be able to interact with any table. To clarify, sql connects you to an existing SurrealDB instance, whether spawned by Surrealist or another terminal running the start command as presented in the docs.

from surrealdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.