Docs

Databases and mail

MySQL 8.4, PostgreSQL 18 and Redis 8 for your sites, a database per site with its own user, Adminer and a local mail inbox.

On this page

Covo can run MySQL, PostgreSQL and Redis for your sites, plus Mailpit to catch the mail PHP sends. Every one of them is off until you turn it on, listens on 127.0.0.1 only, and keeps its data inside ~/Library/Application Support/covo/. Covo uses its own ports, so it runs next to the MySQL of MAMP, Homebrew or Postgres.app without touching them.

Service Version Default port Turn on
MySQL 8.4 LTS 3307 Settings → MySQL, or covo mysql enable
PostgreSQL 18 5433 Settings → PostgreSQL, or covo postgres enable
Redis 8 6380 Settings → Redis, or covo redis enable
Mailpit 1.33 SMTP 1025 Settings → Mail, or covo mail enable

If a default port is already taken, Covo picks the first free one after it and remembers it.

MySQL

Covo runs the official MySQL 8.4 LTS build from Oracle. It needs a Mac with Apple Silicon: Oracle stopped publishing Intel builds after 8.4.11, so on an Intel Mac covo mysql enable answers unsupported.

covo mysql enable      # download, verify, initialize, start
covo mysql             # status
covo mysql password    # host, port, socket, user and root password
covo mysql disable     # stop; your databases are kept

The default port is 3307 because 3306 usually belongs to MAMP. To choose another one, use covo mysql enable --port N.

The root password is a random 24-character password that Covo generates and stores in your login keychain. It never appears on a command line, in an environment variable or in a file. Print it with covo mysql password when you need it for a GUI client.

Your PHP sites need no extra settings. Covo points PHP’s mysqli and PDO at its own server, so DB_HOST set to localhost or 127.0.0.1 reaches Covo’s MySQL, never another server on port 3306. 127.0.0.1:3307 works too.

PostgreSQL and Redis

PostgreSQL 18 and Redis 8 are optional and built from the official sources. They run on both Apple Silicon and Intel.

covo postgres enable      # PostgreSQL 18 on 127.0.0.1:5433
covo postgres password    # connection details, superuser password included
covo redis enable         # Redis 8 on 127.0.0.1:6380

The postgres superuser password is generated by Covo and kept in the login keychain. PostgreSQL’s major version never changes on its own, since data from different major versions is not compatible.

Redis is one server shared by every site. It has no password: protected mode is on and nothing outside your Mac can reach it. New Laravel projects use it automatically when it is on.

One caveat for PostgreSQL: with Covo’s PHP 8 builds, PDO pgsql must connect through Covo’s Unix socket, because the PDO driver in those builds hangs over TCP. Use the socket folder shown by covo db show <site> as the host. New Laravel projects are already set up this way. pg_connect works over 127.0.0.1 as well.

A database for each site

Covo can give a site its own database and a user that can only use that database. The password is stored in your login keychain.

covo db create shop                    # database "shop" with user "shop"
covo db create shop --name shop_wp     # choose the database name
covo db create shop --engine pgsql     # on PostgreSQL
covo db show shop                      # how to connect
covo db list

You can also create the database when you add the site, with --database new (add --engine pgsql for PostgreSQL). See Sites.

To use a database that already exists, link it. A linked database connects as root (or postgres), as MAMP users are used to:

covo db link blog blog_old
covo db link blog blog_old --engine pgsql

Unlinking and removing are separate on purpose:

covo db unlink shop                 # forget the link, keep the data
covo db unlink shop --drop --yes    # delete the database and the site's user

Removing a site keeps its database. Only --drop deletes data. MySQL’s own system databases are never created, linked or dropped.

In the app, use the Database line of the site detail: Add, then Create or Link. The same line opens Adminer, shows the credentials and the wp-config.php settings to copy.

Adminer

While MySQL or PostgreSQL is on, Covo serves Adminer at https://adminer.localhost:8443/ (no port if you use port 443, see HTTPS). It works with both MySQL and PostgreSQL.

The app opens Adminer already logged in: as root from the toolbar button, or as a site’s own user from its detail. It uses a one-time login that expires after 60 seconds, so the password never shows up in a URL, the clipboard or a file. Without the app, log in with the details from covo mysql password.

adminer.localhost is reserved and cannot be used by a site.

Mail

Mailpit catches every mail your sites send, so nothing leaves your Mac while you test contact forms, orders or password resets.

covo mail enable     # catch every mail PHP sends
covo mail            # status: inbox address, SMTP port
covo mail disable    # stop catching; messages are kept

While mail is on, PHP’s mail() and WordPress’s wp_mail() deliver to the local inbox at https://mail.localhost:8443/. Code that speaks SMTP can use 127.0.0.1:1025. The inbox keeps up to 5000 messages.

In the app: Settings → Mail, and the envelope button in the toolbar opens the inbox. mail.localhost is reserved like adminer.localhost.

Turning things off

Disabling a service stops it and keeps its data. covo uninstall deletes all databases with the rest of Covo’s folder and removes Covo’s passwords from the keychain. Take a snapshot or export what you need first.