Skip to content

Database

Typemo can read one table or view from your PostgreSQL or MySQL database on a schedule. Each row becomes a document, and every run replaces the collection with the rows the table holds now. You don’t need to build an export or a feed.

  • The database is reachable from the internet. Typemo connects from its own servers, and the host name must resolve to a public address. Private and internal addresses are refused.
  • A user that can only read the table. Typemo opens the database read-only and only for as long as it takes to copy the table. A read-only user makes sure of it on your side too.

To create that user:

PostgreSQL
CREATE ROLE typemo_reader LOGIN PASSWORD '…';
GRANT CONNECT ON DATABASE shop TO typemo_reader;
GRANT USAGE ON SCHEMA public TO typemo_reader;
GRANT SELECT ON public.products TO typemo_reader;
MySQL
CREATE USER 'typemo_reader'@'%' IDENTIFIED BY '…';
GRANT SELECT ON shop.products TO 'typemo_reader'@'%';
  1. Pick Database in the setup wizard. For an existing collection, open its Data page and click Change source type. Switching deletes the documents the collection holds.

  2. In Connection URL, paste the address with the user and password: postgres://user:password@host:5432/database or mysql://user:password@host:3306/database.

  3. In Table or view, name the table: products, or public.products with its schema.

  4. Click Check connection. Typemo shows the table’s row count, its columns and its first rows, so you see the values before the first sync.

  5. Under Sync, pick how often to read the table: Every 2 hours, Every 6 hours, Daily (the default) or Weekly.

  6. Click Continue, or Open dashboard when you add a collection later. The first sync starts right away.

    The setup wizard with the Database card picked: Connection URL and Table or view filled in, the Check connection button, and Sync set to Daily
    The Database card in the setup wizard

Once the first sync lands, mark which column is the title, the price and the rest on Search → Setup. See Map your fields.

On the collection’s Data page, click Configure. Click Save to keep your changes, or Sync now to read the table at once.

The password is stored encrypted and never shown again. The form shows the address without the user and password, and the saved ones keep working while the address stays the same. To change the password, paste the full URL again.

Values are typed the way CSV cells are: 24.90 becomes a number and 0042 stays text. Arrays and JSON columns arrive as text. The full rules are in How values are typed.

On the Data page, click Sync log next to Last sync. Each run shows how many documents it indexed. If the database can’t be reached or the read fails, search keeps the previous version and Details shows the reason. A table that hasn’t changed since the last sync leaves search untouched.

Next: Map your fields, or read How syncs work.