JillionDB
DocsLive database

Docs

Live database

Connect your real database so JillionDB can tell you when it and JillionDB disagree. Pro and Enterprise.

What it does

JillionDB reads the table definitions of your PostgreSQL or MySQL database and compares them with the schema in your project. If someone changed the database outside JillionDB, or an approved change hasn’t been applied yet, you see each difference in plain words.

Create a login that can’t read data

Run this once on your database, as an admin. Put your own database name and a long password in.

PostgreSQL (Neon, Supabase, Amazon RDS and others):

CREATE ROLE jilliondb_reader LOGIN PASSWORD 'choose-a-long-password';
GRANT CONNECT ON DATABASE your_database TO jilliondb_reader;
GRANT USAGE ON SCHEMA public TO jilliondb_reader;

MySQL:

CREATE USER 'jilliondb_reader'@'%' IDENTIFIED BY 'choose-a-long-password';
GRANT REFERENCES ON your_database.* TO 'jilliondb_reader'@'%';

PostgreSQL lets any login read table definitions, and MySQL’s REFERENCES permission shows them without allowing reads, so neither login can see your data.

Connect

  1. Open your project and press the database button in the toolbar.
  2. Paste the connection string from your provider, using the login above, or fill in the fields one by one.
  3. Choose the encryption: Encrypted, certificate checked for Neon, Supabase and most hosted databases, or Encrypted only for providers with their own certificate, such as Amazon RDS.
  4. Press Connect and check. JillionDB reads the database and shows whether it matches.

When they differ

The list shows what JillionDB would change to match your database. Press Update JillionDB to match to bring your project in line; the current schema is saved as a version first, so you can go back. If the database is the one that’s behind, apply your migrations as usual and press Check now.

JillionDB checks again every few hours while automatic checks are on, and whenever you open the project after an hour or more.

If it can’t connect

If your database only accepts certain IP addresses, allow 162.254.39.64. JillionDB can’t reach databases on private networks; use the public address your provider gives you.

Private, local and SQLite databases: the bridge

If JillionDB can’t reach your database because it’s on your laptop, inside a private network or a SQLite file, run the bridge instead. It’s a small open-source command that reads the table definitions where your database is and sends only those to JillionDB. Your database password never leaves your machine, and JillionDB never connects in.

  1. Open your project, press the database button and choose Run the bridge.
  2. Press Create token and copy it. It only lets the bridge send table definitions to this one project.
  3. Run the command wherever your database can be reached, with your own connection string or the path to your SQLite file.
npx jilliondb push --token jdbb_… --url postgresql://user:password@localhost:5432/app

The result shows straight away, in your terminal and in the project. Add --watch to keep the bridge running and send again every 15 minutes, or run it in CI after each deploy with --fail-on-drift to stop the build when your database and JillionDB disagree. Add --print to see exactly what would be sent, without sending anything.

The bridge needs Node 20 or later, or Node 22.13 or later for SQLite files. You can set the token as JILLIONDB_TOKEN and the database as DATABASE_URL instead of typing them in the command.

Disconnecting

Press Disconnect in the same window. JillionDB deletes the saved login and stops checking. The password is stored encrypted until then. You can also remove the login from your database at any time.