Replies: 1 comment
-
Hello @0xBradock, here are some tips that are helpful for when you are in a SurrealDB instance and don't know what namespaces and databases exist, or which namespace and database is the one that is currently active in your session. All of these should work when run as a query either from the CLI tool or Surrealist. If you don't know what namespaces and databases exist in your SurrealDB session:The You can get information about the overall SurrealDB session, including a list of all namespaces that exist, with the INFO FOR ROOT;
INFO FOR KV; You can set a given namespace as active with the USE NAMESPACE existing_namespace_name; You can see what databases exist in the current namespace with this INFO FOR NAMESPACE; You can set a given database as active with the USE DATABASE existing_database_name; If you know what namespaces and databases exist in your SurrealDB session, but don't know which are currently active:The RETURN session::ns(); The RETURN session::db(); If no namespaces and/or databases exist in your SurrealDB session:The USE NAMESPACE new_namespace_name;
USE DATABASE new_database_name; Sourceshttps://surrealdb.com/docs/surrealql/statements/info |
Beta Was this translation helpful? Give feedback.
-
Hello,
I am trying to connect for the first time using the surrealist app but I don't know the initial
namespace
anddatabase
name.curl -sSf https://install.surrealdb.com | sh
surreal start --log trace --user <user> --pass <pass> file:<file>.db
public DNS:8000
I am redirected to the surrealist pageThen, to connect with surrealist I need a
namespace
anddatabase
, but I can not find info on this.If I try to connect with a random
namespace
and randomdatabase
name I get the following error:Any help is appreciated,
Beta Was this translation helpful? Give feedback.
All reactions