I have a NextJS / Rust / Tauri app that was developed by a mate. It uses SurrealDB with storage & works great running on a Win11 VM. I would like to connect Surrealist Query (Desktop) so I can visualise the Surreal DB through a GUI, however I have not been able to connect to the DB despite trying lots of different connection details.
The connection code from the app is
static DB: Lazy<Surreal<Db>> = Lazy::new(Surreal::init);
#[tokio::main]
async fn main() -> Result<()> {
DB.connect::<File>("file://../database.db").await?;
DB.use_ns("namespace").use_db("database").await?;
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![
ipc::video_download,
ipc::video_create,
ipc::video_read,
ipc::video_update,
ipc::video_search,
ipc::video_exists,
])
The windows path to the database.db folder is "C:\Users\dev\Desktop\LocalVideoLibrary\LocalVideoLibrary\src-tauri\database.db"
In Surrealist Query "Connection Details" I have... Endpoint URL: file://C:/Users/dev/Desktop/LocalVideoLibrary/LocalVideoLibrary/src-tauri/database.db Namespace : namespace Database : database Authentication Mode : Anonymous
The Tauri window is running fine & I can make changes to the SurrealDB via the app, but at the same time I am unable to connect to the DB using Surrealist with the config above.
You are running an embedded SurrealDB using RocksDB stored on disk. Surrealist can only connect to loose-standing SurrealDB databases.
In theory, you could also run a standalone database and point it to the same file system location, then connect to it from Surrealist, however you can't run both the embedded database and standalone database at the same time.
I hope this helps!