openHalo
OpenHalo is an open-source PostgreSQL kernel that provides MySQL wire-protocol compatibility.
openHalo is based on PostgreSQL 14.18 and provides wire-level compatibility with MySQL 5.7.32-log / 8.0.
Pigsty delivers it through pg_mode: mysql and the openhalo package alias.
Pigsty supports OpenHalo deployment on all supported Linux platforms.
- RPM build spec: github.com/pgsty/rpm/rpmbuild/specs/openhalodb.spec
- DEB build spec: github.com/pgsty/deb/debbuild/openhalodb
Quick Start
Prepare the workspace through Pigsty’s standard installation, then select fork/halo (conf/fork/halo.yml). -c halo and -c fork/halo are equivalent; -c mysql selects the native MySQL pilot conf/demo/mysql.yml:
Cluster Config
OpenHalo’s aux_mysql extension supplies MySQL compatibility functions and types. Enable it for the postgres database in pg_databases. At runtime, aux_mysql uses PGDATA to locate data-directory resources. With pg_mode: mysql, Pigsty injects Environment="PGDATA={{ pg_data }}" into patroni.service (default /pg/data). Preserve this variable when starting manually or using custom systemd units.
Usage
MySQL connections use the postgres database.
A MySQL database maps to a PostgreSQL schema.
Thus, use mysql selects the mysql schema in the postgres database.
Use the PostgreSQL usernames and passwords for MySQL access.
Client Access
OpenHalo listens on port 3306 for MySQL wire protocol clients.
The fork/halo template installs the OpenHalo server. Install a compatible MySQL client separately before using the command below.
OpenHalo upstream currently reports that Navicat works normally on this port. IntelliJ DataGrip may fail.
Compatibility Parameters
Pigsty sets database_compat_mode to mysql by default.
To adjust compatibility behavior, use settings such as:
Patch Notes
Pigsty packages the OpenHalo kernel from HaloTech-Co-Ltd/openHalo with these adjustments:
- Restore default database name from
halo0roottopostgres - Remove
1.0.prefix in the default version string, keeping14.18 - Adjust default config to enable MySQL compatibility and listen on
3306
Pigsty does not provide warranty coverage for OpenHalo kernel behavior. Contact the upstream vendor about kernel-specific issues.
Warning: This kernel is currently in beta1. Evaluate its risks carefully before production use.
Available Extensions
The table lists selected non-Contrib extensions for reference. Query the target instance to confirm actual availability and versions.
| Extension | Version | Description |
|---|---|---|
| aux_mysql | 1.5 | MySQL Supplementary Extension |
| hstore_plpython2u | 1.0 | transform between hstore and plpython2u |
| hstore_plpythonu | 1.0 | transform between hstore and plpythonu |
| jsonb_plpython2u | 1.0 | transform between jsonb and plpython2u |
| jsonb_plpythonu | 1.0 | transform between jsonb and plpythonu |
| ltree_plpython2u | 1.0 | transform between ltree and plpython2u |
| ltree_plpythonu | 1.0 | transform between ltree and plpythonu |
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)