# Build and start Mimus

> Compile Mimus 19.0.1 and pg_mysql from the public Git trees, initialize a data directory, and verify native PostgreSQL connectivity.

---

LLMS index: [llms.txt](/llms.txt)

---

## Prerequisites {#prereqs}

You need a Linux host (Debian 13, Ubuntu 24.04/26.04, or Rocky Linux 9/10) with standard PostgreSQL build dependencies: a C11 compiler (`gcc` or `clang`), `meson` / `ninja` or GNU `make`, `bison`, `flex`, `libreadline-dev`, `zlib1g-dev`, `libssl-dev`, `libicu-dev`, `libxml2-dev`, and `pkg-config`.

## Compile the kernel and pg_mysql {#build}

Clone the public [pgsty/mimus](https://github.com/pgsty/mimus) kernel repository and the companion [pgsty/pg_mysql](https://github.com/pgsty/pg_mysql) extension repository, check out the verified `19.0.1-r4` revisions, and install under `/usr/mimus-19`:

```sh
git clone https://github.com/pgsty/mimus.git
cd mimus && git checkout 0d8a551aa121

./configure --prefix=/usr/mimus-19 --with-ssl=openssl --with-icu --with-libxml
make -j"$(nproc)"
sudo make install
cd ..

git clone https://github.com/pgsty/pg_mysql.git
cd pg_mysql && git checkout 1e631f9802c5
make -j"$(nproc)" PG_CONFIG=/usr/mimus-19/bin/pg_config
sudo make PG_CONFIG=/usr/mimus-19/bin/pg_config install
```

> [!TIP] Additional extensions
> To add `pg_tde`, `spock` or `Babelfish` onto the same `/usr/mimus-19` prefix, build each extension against `/usr/mimus-19/bin/pg_config` using the matched source trees listed in [Kernel Patch Manifest](/docs/reference/patches/base/#components).

## Initialize and verify the instance {#verify}

Create a fresh data directory, start the server on port `5432`, and inspect the version and cluster feature state:

```sh
export PATH="/usr/mimus-19/bin:$PATH"
initdb -D /var/lib/mimus/data --auth-local=peer --auth-host=scram-sha-256 --encoding=UTF8
pg_ctl -D /var/lib/mimus/data -l /var/lib/mimus/logfile start

psql -X -d postgres -c "SELECT current_database(), current_user, version();"
psql -X -d postgres -c "SHOW mimus_required_features;"
```

On a freshly initialized cluster before any optional compatibility or encryption feature is activated, `mimus_required_features` returns an empty string, meaning the directory remains a plain PostgreSQL 19.0 data directory.

Next, continue to [Shared table across MySQL and PostgreSQL](/docs/tutorials/shared-table/) to enable the MySQL wire listener on this instance.

---

Backlinks:

- [Verification Matrix](/docs/reference/verification/)
- [Tutorials](/docs/tutorials/)
- [Shared MySQL & PG Table](/docs/tutorials/shared-table/)
