# MySQL

> Connect a MySQL application to Mimus 19.0.1 and read the same tables with PostgreSQL.

---

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

---

A MySQL client can create a table on TCP port 3306 and a PostgreSQL client can read it on port 5432. Mimus 19.0.1 runs PostgreSQL 19.0 with the OpenHalo protocol hooks and the standalone `pg_mysql` 1.0 extension. The two connections share tables, roles and transactions committed by other sessions. Each uses its own wire protocol and SQL dialect.

## Which database am I using? {#mapping}

All MySQL connections enter the PostgreSQL database selected by `mysql.database` (default `postgres`). Inside it, a MySQL “database” is a PostgreSQL schema. With the example settings, `mysql … app` selects schema `app` and `psql -d postgres` sees its table as `app.notes`. A MySQL `USE` changes the selected schema on that connection.

## First connection {#try}

[Install and connect](/docs/mysql/quickstart/) takes you from matching source trees to an ordinary login, an insert and a native PostgreSQL read. For additional hosts and existing services, see [server configuration and authentication](/docs/mysql/reference/).

## Before moving an application {#gaps}

Start with the columns that identify rows and the transactions that read them. An unsigned 64-bit key can exceed the supported range, and two plain reads in a writable `REPEATABLE READ` transaction can see different commits. Check your source values and replay one complete transaction with your own driver. [SQL and types](/docs/mysql/compatibility/) · [Tested drivers](/docs/mysql/drivers/) · [Migration and recovery](/docs/mysql/operations/) · [Limits and troubleshooting](/docs/mysql/status/)

## How it works {#source}

OpenHalo contributed the protocol and grammar. Mimus pairs the 300/301 kernel changes with a separately built extension. [MySQL kernel patches](/docs/patches/mysql/) · [Source versions and credits](/docs/mysql/architecture/)

Use a separate instance for applications that need the SQL Server protocol. For additional dialect reference see the PG.CENTER OpenHalo manual. [Instance configuration](/docs/intro/architecture/#connections) · [OpenHalo reference](https://doc.pg.center/openhalo/)

---

Section pages:

- [Install and connect](/docs/mysql/quickstart/): Install the matching pg_mysql, enable its listener and write a row as an application user.
- [Server configuration and authentication](/docs/mysql/reference/): Configure the listener, database, dialect, password exchange and TLS.
- [SQL and type compatibility](/docs/mysql/compatibility/): Compare write results, type ranges, collation, transaction visibility and constraints.
- [Clients and drivers](/docs/mysql/drivers/): Check login, query results, server-side preparation and application workflows.
- [Migration and recovery](/docs/mysql/operations/): Rehearse a logical migration, verify restored objects and check encrypted storage.
- [Limits and troubleshooting](/docs/mysql/status/): Diagnose connection and migration failures and identify workloads that still need a trial.
- [Protocol, dialect and origins](/docs/mysql/architecture/): Follow a connection into PostgreSQL and identify the matching kernel, extension and original authors.

---

Backlinks:

- [MySQL compatibility as a PostgreSQL 18 extension](/blog/mysql-as-a-postgresql-18-extension/)
- [One kernel, many protocols](/blog/one-kernel-many-protocols/)
- [Introduction](/docs/intro/)
- [300 / 301 · MySQL](/docs/patches/mysql/)
