Getting started

First steps checklist

A short checklist to take a new Raft DB installation from the unpacked download to a safe, working single server.

Work through this list once on a new installation. Each step names the page with the details.

1. Get the programs and check#

  • Download Raft DB from the Download page. On Windows run the setup file (Installing Raft DB); otherwise unpack the download.
  • Run raftdb-server --check-config and raftdb-mysql --help to see that the binaries start.

2. Settings#

  • Generate a settings file: raftdb-server init --profile single and read it. It holds one real line (profile = single).
  • Decide where the data lives and set dir (an absolute path). If you do nothing, ./raftdb-data relative to the working directory is used.
  • Keep the profile single (loopback only) until you have a tunnel or a private network, because nothing is encrypted (Security overview).
  • Run raftdb-server --print-config and check each value and where it came from.

3. Start the server#

  • Start it: raftdb-server --config raftdb.conf.
  • Find admin.password in the data directory. Read it and keep the file readable by its owner only.
  • Open http://127.0.0.1:7480/ if you passed --studio studio, and log in as admin.

4. The SQL front-end (if you use SQL)#

  • Write raftdb.conf with an explicit user = connector:PASSWORD:admin and mysql.conf with embed, raftdb_user = connector, the same password, and at least one user = NAME:PASSWORD for your application (raftdb-mysql settings).
  • Do not put # in passwords stored in a file.
  • Start raftdb-mysql --config mysql.conf and connect with mysql -h 127.0.0.1 -P 3307 -u NAME -p (Connecting).
  • Create a separate account for the application with CREATE USER and GRANT limited to its database, and keep the bootstrap administrator for yourself (MySQL accounts).

Other front-ends#

SQL Server clients use raftdb-mssql (port 1433) and PostgreSQL clients use raftdb-pg (port 5432); the installer starts them with the others. See Connecting with clients.

5. Try it#

  • Run the first statements of the tutorial.
  • Insert a few rows, restart the server (Ctrl-C and start again) and check that the rows are still there.

6. Protect it#

See also#