To get started, install the SurrealDB CLI on your local machine.
Getting started
After installing the SurrealDB CLI, you can start writing SurrealQL queries by running the surreal start command in your terminal. You can also add the --help flag to view the available options and commands.
To start a SurrealDB server, run the surreal start command, using the options below. This example serves the database at the default location (http://localhost:8000), with a username and password.
The server is actively running, and can be left alone until you want to stop hosting the SurrealDB server.

Running queries
To run a SurrealQL query, open up a new terminal window and run the surreal sql command. You will now be connected to the server and able to follow up with a query. For example, to run a simple SELECT query, you can run the following command:

Learn more
Learn more about the available commands and options in the SurrealDB CLI documentation.