Skip to content

Databases

Engine Versions Port
MySQL 8.4.6, 8.0.44 13306
MariaDB 12.3.2, 11.4.12 LTS 13307
PostgreSQL 18.4.0, 17.10.0, 16.14.0 15432
Redis 8.8.0 16379

Engines start on demand:

Terminal window
rex service start mariadb
rex db versions --set mysql 8.0.44
rex db browse # Adminer

A site picks MySQL or MariaDB at create time, and gets its own database and credentials. Nothing is shared between sites except the server process.

Each engine keeps a separate data directory per version series. Switching MySQL from 8.4 to 8.0 does not attempt to downgrade a data directory — it starts the 8.0 series with its own directory, and 8.4’s data is still there when you switch back.

That is why switching is safe and why it is not a migration: data does not follow you across. To move data between series, export from one and import into the other.

Terminal window
rex db export myshop.rex # writes to ~/Downloads, prints the path
rex db import myshop.rex dump.sql # OVERWRITES the site's tables

rex db browse, or the button on a site, opens Adminer 5.4.2 deep-linked straight into that site’s database — already connected, already on the right schema. It is served as an internal vhost through the shared nginx, so it holds no port of its own.

Redis is a service rather than a per-site choice. Start it when a project needs it, and point the project at 127.0.0.1:16379.

MySQL on 13306 rather than 3306, and so on, so rexenv never collides with a database you already installed. See Ports.