MySQL wire protocol examples
These recipes describe existing MySQL-protocol listeners. MySQL is not offered as a new connection method. The examples do not establish current PostgreSQL database-login write support.
Start with the connection and table setup. Keep its connection and model available when running the transaction snippets. These examples use the MySQL protocol as a way to send SQL; they do not start a separate MySQL server.
- Confirm the existing listenerRead its supported connection and credential requirements.
- Connect over verified TLSKeep certificate validation enabled.
- Choose a supported taskUse the documented query, catalog or permitted write recipe.
- Inspect the resultVerify behavior before adopting it in your application.
Existing MySQL listener examples
- Run SQL on an existing MySQL listener — Connect over TLS and run basic row operations.
- Commit or roll back writes — Commit related writes together or discard them on an existing writable MySQL listener.
- Insert or update a primary key match — ON DUPLICATE KEY UPDATE inserts a row or updates its existing primary-key match on the described listener.
- Read table metadata — Tools read metadata to discover tables and columns.
Check the connection first
Read the compatibility requirements. Confirm the existing listener, TLS and credential mode before running a write. Current PostgreSQL database logins are read-only; they are not a replacement connection for the write examples on this page.
MySQL is a registered trademark of Oracle Corporation and/or its affiliates. OriginChainDB is not affiliated with, endorsed by, or sponsored by Oracle Corporation. OriginChainDB implements a compatible wire protocol so that existing MySQL clients can connect to it; it does not distribute MySQL software.