Skip to content
Pancake Stack
ChaptersPancake Stack Manual
Getting started
  1. 1Welcome to Pancake
  2. 2A tour of the window
  3. 3Your first site
Building sites
  1. 4Working with sites
  2. 5Files, the editor and design
  3. 6Bringing sites in
  4. 7Databases
Sharing and publishing
  1. 8Putting sites online
  2. 9On my network and local HTTPS
  3. 10Mail from your sites
  4. 11Deploying
Running your stack
  1. 12Backups and save points
  2. 13Services, tasks and workers
  3. 14The Assistant and MCP
Reference
  1. 15Settings, templates and plug-ins
  2. 16Plans and subscription
  3. 17Troubleshooting
  4. 18Privacy and your data

Pancake Stack › Pancake Stack Manual

Mix the batter · Building sites

Databases

Each site's own MySQL database, Adminer and phpMyAdmin, import and export, connecting databases you already have, and PostgreSQL.

The Databases pane: each database with its size and site, and the Adminer, Export and Import buttons.
Figure 7.1The Databases pane: each database with its size and site, and the Adminer, Export and Import buttons.

7.1Pancake's databases

Every site gets its own MySQL 8.4 database and its own user, who can open only that database. Both are named after the site (my-blog becomes my_blog). The password is random and kept in your Keychain; the site reads everything from DB_HOST, DB_PORT, DB_NAME, DB_USER and DB_PASSWORD, so it never needs to be in the site's files.

The Databases pane lists each database with its size, number of tables and the site that uses it. MySQL has to be running to see them: click Start All.

7.2Adminer and phpMyAdmin

Adminer opens a database in your browser, at adminer.localhost, where you can browse tables, run queries and edit rows. Pancake fills in the server, user and database; type the password. Use the site's own user, or root with the password from Advanced ▸ Copy root password. Adminer never goes online, even with Outside Access on.

Prefer phpMyAdmin? Click phpMyAdmin, download the "all-languages" ZIP from phpmyadmin.net, and choose it. Pancake serves it as a site at phpmyadmin.localhost that stays on this Mac. (phpMyAdmin is not part of Pancake.)

7.3Export and import

Tip

Export before big changes, or take a save point on the site's card: it copies the database together with the files.

7.4Connecting other apps

With Advanced on, Connect from other tools shows what to type into TablePlus, Sequel Ace, DBeaver or another database app: host 127.0.0.1, the port MySQL is using (usually 3306), and user root. Copy root password copies the password. Pancake's MySQL accepts connections from this Mac only.

If another MySQL (MAMP's, Homebrew's or Docker's) already uses port 3306, Pancake's MySQL takes the next free port, such as 3307, and the pane shows it.

7.5Outside databases

A site can use a database you already have instead of Pancake's: MAMP's MySQL, one on a NAS or another computer, or a cloud database such as Amazon RDS, Supabase or Neon.

  1. Click Connect a database I already have….
  2. Choose MySQL / MariaDB or PostgreSQL TallStack. A preset fills in common set-ups: MAMP (port 8889), Homebrew or Docker, a cloud database with TLS, Postgres.app, or Supabase, Neon and RDS.
  3. Give it a Name, then the Server, Port, Database, User and Password.
  4. Choose the Security: Encrypted (TLS), Encrypted, check the server's certificate (pick its CA file), or Not encrypted, which is allowed only for this Mac and your local network.
  5. Click Test, then Save.
  6. On the site's card (Advanced), set Database to the new connection.

The site then gets that database's details as DB_HOST, DB_PORT and the rest, plus DATABASE_URL, DB_CONNECTION and DB_SSL_MODE.

Each outside connection has Test, Export…, Copy into Pancake (a local copy named <name>_copy to develop against safely), Edit… and a trash button that forgets the connection without touching the database.

Note

Pancake connects over the network, not through a socket file: App Store apps can't use other apps' sockets. Use host 127.0.0.1 and the server's port.

Through SSH

TallStack Many servers accept database connections only from themselves. Turn on Connect through SSH and add the SSH server, port, user and a password or key file. The database's Server is then its address as seen from the SSH server, usually 127.0.0.1. Pancake keeps the tunnel open and reopens it if it drops.

If the test fails

Pancake translates the usual errors into plain words: wrong user name or password; no database with that name; the server doesn't accept connections from this Mac (allow it on the server, or connect through SSH); the server name can't be found; nothing answers on that port (is it running, and does a firewall allow this Mac?); or the encrypted connection failed (if the server is on your network and has no TLS, choose Not encrypted; if it uses its own certificate authority, pick the CA file).

7.6PostgreSQL

FullStack Pancake includes PostgreSQL 17. Switch it on in the Services pane. Each site then also gets its own PostgreSQL database and role (site_<name>), and reads them from PGHOST, PGPORT, PGDATABASE, PGUSER, PGPASSWORD and POSTGRES_URL. PHP's pgsql and pdo_pgsql extensions are included.

PostgreSQL databases appear in their own section of the Databases pane, with the same Adminer, Export, Import and New Database buttons. For other apps, use user postgres with Copy postgres password (Advanced).