Skip to content

Connecting to SQLite from the command line

SQLite is a lightweight, serverless database engine. On ruachost.com, you can connect to SQLite databases directly from the command line using the sqlite3 program.

  • Quick and easy access to SQLite databases.
  • Run SQL queries without needing a GUI.
  • Useful for debugging, scripting, and development.
  • Use SSH to connect to your hosting account:
Terminal window
ssh username@yourserver.ruachost.com
  • At the command line, type:

    Terminal window
    sqlite3 example.db
  • Replace example.db with the name of your database file.

  • If the file does not exist, SQLite will create it.

  • If the file exists, SQLite will open the database contained in it.

Once inside the sqlite> prompt, you can run SQL queries and special commands:

Terminal window
.quit