Hi! 👋 We are doing a big documentation refresh. Help us improve — what's missing or could be better? Let us know! Simply send an email or start a conversation in Google Groups!

DuckDB overview

The DuckDB plugin gives ProxySQL an embedded analytical database. Connect with supported MySQL or PostgreSQL clients and run DuckDB SQL against shared working tables, without starting a separate database server.

This can be useful for small analytical datasets, local operational data, and scripts that need to share tables through familiar SQL clients. The embedded data is separate from the MySQL and PostgreSQL backend databases that ProxySQL routes application traffic to.

Availability

These guides cover ProxySQL 4.0.12 with DuckDB 1.4.5. The plugin requires a matching source-built 4.0 core and shared library; the downloadable 4.0.12 packages do not include it.

Start here

  1. Install the plugin.
  2. Follow the quickstart to choose storage, create endpoint users, and query a table through both protocols.
  3. Check client compatibility before adapting a driver or reporting tool.

For regular use:

Connections and storage

ProtocolDefault addressPortUser table
MySQL0.0.0.06031mysql_users
PostgreSQL0.0.0.06034pgsql_users

These listeners are separate from ProxySQL Admin on 6032 and the ordinary MySQL proxy endpoint on 6033. The defaults listen on all interfaces; restrict reachability before sharing them.

Every admitted client uses the same DuckDB database. Each connection has its own transaction and session settings. By default, the database lives in memory and disappears when ProxySQL stops. Choose a file-backed database before loading data you want to retain.

What to check before using a client

  • Use simple text-query APIs. Client prepared statements and PostgreSQL extended-query execution are unsupported.
  • Send one SQL statement per request.
  • Result columns are described as text, even when their displayed values are numeric.
  • Endpoint accounts share database access; they do not provide separate table permissions.
  • Queries share the ProxySQL process’s memory and CPU. Configure resource limits; there is no per-query timeout.
  • External filesystem access is disabled by default. Enable it only when every endpoint user is trusted with the corresponding filesystem access of the ProxySQL service account.

The security guide and compatibility reference explain these choices in more detail.