Docs / Quick start

Quick start

This guide takes you from an empty workspace to a running query in a couple of minutes. You'll need MamaSQL installed — see Installation if you haven't yet.

Connect a database

Open MamaSQL and add your first connection:

  1. Click + New connection in the sidebar.
  2. Choose an engine — MySQL, PostgreSQL or SQLite.
  3. For MySQL/PostgreSQL, enter host, port, database and user; for SQLite, just name a new local database.
  4. Click Test, then save and connect.

Your credentials stay local. Passwords are stored in your OS keychain and queries run straight from your machine. More in Connecting databases.

Run your first query

Open a new query tab, pick your connection, and run some SQL. Press (or Ctrl ) to execute.

-- Your first query
SELECT * FROM users
ORDER BY created_at DESC
LIMIT 20;

Explore the results

Results appear in the panel below the editor. From there you can:

  • Sort by clicking a column header, and filter rows as you type
  • Switch between Table, Chart and Stats views
  • Edit cells inline, add or delete rows
  • Copy cells or rows, or export to CSV, JSON, Markdown or SQL

Next, dig into the SQL editor to get the most out of autocomplete and formatting.