Skip to content

ProxySQL

Chris edited this page Jul 18, 2026 · 103 revisions

ProxySQL: Traffic Orchestration

Tools Resources Prompts
OAuth Code Mode

Value Proposition Manage advanced traffic orchestration. Integrating ProxySQL empowers your AI agents to dynamically optimize connection pools, orchestrate query routing, and gain real-time insights into your database's critical routing layer. Read the full value proposition.


Establish Routing Prerequisites

  • ProxySQL with admin interface enabled
  • Admin interface credentials (default: admin/admin on port 6032)
  • Network access to ProxySQL admin port

Browse ProxySQL Tools

The server provides a suite of tools for ProxySQL management. Leverage the native MCP discovery mechanism or the mysql_tool_index prompt to explore the dynamic list of ProxySQL tools.

Prominent Examples:

  • proxysql_status: Get ProxySQL version, uptime, and runtime stats.
  • proxysql_query_rules: List query routing rules.
  • proxysql_process_list: Get active sessions.

Tip

See Tools for global token optimization parameters.


Secure Administrative Access

Configure the Default Admin Interface

Integrate and manage your database routing layer. ProxySQL's native administrative interface allows AI agents to optimize connection pools and query routing. Establish a connection using:

mysql -h127.0.0.1 -P6032 -uadmin -padmin

Tip

We use 127.0.0.1 intentionally in the bash example. This forces a TCP connection. This differentiates it from MYSQL_HOST or the standard mysql client socket default, rather than implying it defaults to localhost.


Configure Your Environment

Variable Default Description
PROXYSQL_HOST 127.0.0.1 ProxySQL admin interface host (forces TCP)
PROXYSQL_PORT 6032 ProxySQL admin port
PROXYSQL_USER admin Admin username (often radmin for remote admin)
PROXYSQL_PASSWORD admin Admin password

Caution

Change default ProxySQL admin credentials in production. Use environment variables or secure secrets management.

Tip

Use the mysql_setup_proxysql prompt as an integrated way to initialize configurations.

Note

Agent Routing: To dynamically route data traffic, agents should configure the MYSQL_PORT to use the ProxySQL data port (typically 6033).


Integrate MCP Configuration

{
  "mcpServers": {
    "mysql-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@neverinfamous/mysql-mcp",
        "--transport",
        "stdio"
      ],
      "env": {
        "MYSQL_HOST": "127.0.0.1",
        "MYSQL_PORT": "6033",
        "MYSQL_USER": "user",
        "MYSQL_PASSWORD": "<YOUR_PASSWORD>",
        "MYSQL_DATABASE": "database",
        "PROXYSQL_HOST": "127.0.0.1",
        "PROXYSQL_PORT": "6032",
        "PROXYSQL_USER": "admin",
        "PROXYSQL_PASSWORD": "<YOUR_ADMIN_PASSWORD>"
      }
    }
  }
}

Isolate Administrative Tools

Isolate administrative capabilities to streamline the agent's context window and ensure bounded workflows:

{
  "args": [
    "-y",
    "@neverinfamous/mysql-mcp",
    "--transport",
    "stdio",
    "--tool-filter",
    "proxysql"
  ]
}

This exposes only the ProxySQL tools, explicitly preserving access to standalone tools like proxysql_status within the filtered context.


Explore Related Topics

MySQL MCP Documentation

Value Proposition Enforce strict execution boundaries and maximize LLM context efficiency for secure, autonomous database interactions. Read the full value proposition

🏠 Home


Launch Your Setup


Connect Ecosystem Tools


Security & Compliance


Scale Your Operations


Explore External Links

Clone this wiki locally