TheRobotLearns Platform · Database Infrastructure
ProxySQL: from first install to production
Install ProxySQL, route MySQL and PostgreSQL traffic, and manage configuration, clusters, security, monitoring, and admin operations. You cover installation choices, config layers, routing rules, authentication, and monitoring endpoints. For DBAs with MySQL client skills.
This course is still being written — lessons may change and later modules are coming soon.
What you’ll learn
- Confirm ProxySQL host prerequisites for OS, MySQL/MariaDB, and network before installation.
- Compare package-manager versus source installation for version freshness, customization, dependencies, and maintenance.
- Install ProxySQL using GitHub packages, distribution repositories, or a generic Linux tarball.
- Prepare generic ProxySQL tarballs: verify checksum/signature, create service user, and enable systemd.
- Use repository commands for Debian-family, RedHat-family, SUSE, and Amazon Linux targets.
- Plan ProxySQL tarball upgrades and rollbacks with stopped-state backups and matching plugins.
- Start ProxySQL with service commands and verify it with a version check.
- Connect to ProxySQL admin via MySQL client over TCP loopback instead of socket localhost.
- Identify ProxySQL's PostgreSQL admin connection alternative and port.
- Apply ProxySQL generic-tarball security edits for admin credentials, listeners, interfaces, and ownership.
- Explain ProxySQL admin databases by relating in-memory, SQLite, statistics, and monitor data.
- Explain how ProxySQL config bootstraps fresh instances while SQLite takes precedence after start.
Syllabus
- Foundations & Installation
Track: core
Install ProxySQL from packages, repositories, or tarballs, start it, and connect to its admin interface. You choose an installation path, use systemd, verify checksums, compare admin databases, and trace a query through workers, the query processor, and hostgroups. For DBAs with MySQL client skills.
Objectives
- Install ProxySQL from packages or source and start the service
- Connect to the admin interface and run your first configuration queries
- Explain the threading model and the life of a query inside the proxy
- State ProxySQL's design goals and what they imply for operations
Prerequisites
- None — assumes basic MySQL client skills
- Configuration System
Track: core
Move ProxySQL configuration between RUNTIME, MEMORY, DISK, and config file layers, activate edits, persist them, and back up the Admin database. You work with LOAD/SAVE commands, the main schema inventory, libconfig variables and grammar, and file or mysqldump backups. For DBAs who can connect to a MySQL-compatible admin interface.
Objectives
- Operate the RUNTIME, MEMORY and DISK layers with LOAD and SAVE
- Bootstrap a fresh instance from a config file or --bootstrap
- Inventory the main schema and its configuration tables
- Back up and restore the admin database
Prerequisites
- Module 1: Foundations & Installation
- Admin Schemas, Commands & Stats
Track: core
Learn your way around the five admin databases and the per-module LOAD/SAVE command families, then use the stats tables to answer the daily question: what is the proxy doing right now?
Objectives
- Navigate the five admin databases and their key tables
- Apply the per-module LOAD/SAVE command families correctly
- Read query digests, command counters, the processlist and pool statistics
- Diagnose 'what is the proxy doing' from stats tables alone
Prerequisites
- Module 2: Configuration System
- Users, Authentication & Monitoring
Track: core
Manage frontend and backend credentials, understand the handshake and pass-through authentication, and tune the monitor module so backend failures surface in its tables before users notice.
Objectives
- Manage mysql_users entries and password formats
- Explain the client/backend handshake and pass-through authentication
- Tune the monitor module's check intervals and timeouts
- Read the monitor tables to diagnose backend failure
Prerequisites
- Module 3: Admin Schemas, Commands & Stats
- Configuring Users, Authentication Methods, and Password Constraints(15 min)
- Handshake Behavior and Passthrough Authentication Configuration(15 min)
- Tuning DNS Cache and Monitoring Retention(15 min)
- Reading Monitor Statistics and Logs to Diagnose Backend Issues(20 min)
- Diagnosing Killed Client Connections and Session Cleanup(15 min)
- Users, Authentication & Monitoring — quiz(20 min)
- Backends, Topologies & High Availability
Track: core
Hostgroups, weights and reader/writer roles; production integrations with Galera, Group Replication, Aurora and RDS blue/green; causal reads and sharding patterns.
Objectives
- Configure hostgroups, weights and reader/writer roles
- Integrate Galera and Group Replication clusters safely
- Set up AWS Aurora and RDS blue/green topologies
- Enable causal reads and shard by user, schema or data
Prerequisites
- Module 4: Users, Authentication & Monitoring
- External knowledge of MySQL replication
- Backend Hostgroups, Monitoring, and Replication Routing(20 min)
- Sharding by User, Schema, and Data(18 min)
- GTID-Based Causal Reads with the MySQL Binlog Reader(20 min)
- ClickHouse Backend Through the MySQL Protocol(15 min)
- Router-Managed Writer, Reader, and Split Endpoints(20 min)
- Backends, Topologies & High Availability — quiz(20 min)
- Routing Deep-Dive: Read/Write Split & Rules
Track: core
Build digest-based routing rules, rewrite queries with patterns, cache reads with TTLs, mirror traffic to a shadow backend, and understand what multiplexing costs you.
Objectives
- Build digest-based routing rules for read/write splitting
- Work with the runtime_mysql_query_rules table
- Rewrite queries with replace_pattern and cache results with TTLs
- Mirror traffic and reason about multiplexing trade-offs
Prerequisites
- Module 5: Backends, Topologies & High Availability
- Prepared Statements Internals
Track: elective
Two-tier ID mapping, global statement deduplication, the COM_STMT_* lifecycle, when multiplexing is lost, and the prepared-query result cache. An advanced DBA elective.
Objectives
- Explain the two-tier ID mapping and global statement deduplication
- Trace the COM_STMT_* lifecycle across client, proxy and backend
- Predict when multiplexing is lost and why
- Use the prepared-query result cache effectively
Prerequisites
- Module 6: Routing Deep-Dive
- Security
Track: core
TLS in both directions, SPIFFE identity, the firewall whitelist with DETECTING and PROTECTING modes, the SQL injection engine, audit logging, banning abusive hosts and preserving client IPs with PROXY protocol.
Objectives
- Enable TLS to both clients and backends
- Apply SPIFFE workload identity
- Build a firewall whitelist with DETECTING and PROTECTING modes and tune the injection engine
- Configure audit logging, client error bans and PROXY protocol
Prerequisites
- Module 4: Users, Authentication & Monitoring
- Global Variables Mastery
Track: elective
A reference companion to modules 4-6: every variable family, how values change at runtime, and the default_* session-variable mechanism. Can run in parallel with the routing modules.
Objectives
- Navigate every global variable family
- Change variable values at runtime and know which layer they land in
- Use the default_* session-variable mechanism
Prerequisites
- Module 3: Admin Schemas, Commands & Stats
- Runs in parallel with modules 4-6
- Scale-Out: Cluster & Automation
Track: elective
Run many proxies as one cluster with checksum-based config sync, schedule jobs, expose REST/HTTP endpoints, and feed Prometheus and the embedded TSDB — plus watchdog and FFTO.
Objectives
- Run a multi-proxy cluster with checksum-based synchronization
- Schedule jobs and expose REST/HTTP endpoints
- Monitor through Prometheus metrics and the embedded TSDB
- Operate the watchdog and the Fast Forward Traffic Observer
Prerequisites
- Module 3: Admin Schemas, Commands & Stats
- ProxySQL Cluster Basics: Roles, Source of Truth, and Checksum Synchronization(18 min)
- Administering Cluster Nodes and Synchronization Behavior(25 min)
- Prometheus-Style TSDB and HTTP Monitoring Endpoints(30 min)
- Automation Patterns for Cluster Health, Sync Checks, and Endpoint Data(20 min)
- Scale-Out: Cluster & Automation — quiz(20 min)
- PostgreSQL Track
Track: elective
Connect to ProxySQL admin on port 6132, add PostgreSQL backend servers and users, route queries with pgsql_query_rules, and inspect pgsql_* statistics. You cover the pgsql_* memory, runtime, and disk workflow, extended query routing, prepared statement caching, and session and error monitoring.
Objectives
- Configure PostgreSQL backends and users
- Apply query rules over the extended query protocol
- Manage the PostgreSQL prepared statement cache
- Read PostgreSQL statistics tables
Prerequisites
- Module 2: Configuration System
- Mirrors modules 4-6 for PostgreSQL (v3.0+ features)
- GenAI, MCP, SQLite3 Server & DuckDB
Track: elective
The fast-moving edge of ProxySQL 4.x: the MCP server and its agent-facing tools, RAG ingestion and NL2SQL, the SQLite3 server, and the DuckDB plugin. Elective; content re-validated against v4.0.10.
Objectives
- Run the MCP server and wire an agent to it
- Exercise catalog, full-text search and RAG tools
- Use NL2SQL safely and ingest documents for retrieval
- Serve SQLite3 and DuckDB over SQL protocols and troubleshoot the DuckDB plugin
Prerequisites
- Module 3: Admin Schemas, Commands & Stats
- Stub and deprecated MCP tools are flagged as non-testable
Sources
- Configuring ProxySQL
- Download and Install ProxySQL
- MySQL Prepared Statements Architecture
- ProxySQL Cluster
- SSL Support
- How to Configure ProxySQL for MySQL for the First Time
- Global Variables Quick Reference
- MCP Tables
- How to Set Up ProxySQL Read/Write Split
- The Admin Schemas
- Authentication Methods
- How to Configure ProxySQL for PostgreSQL for the First Time
- Global Variables Quick Reference
- SSL Support
- The Admin Schemas
- MySQL Prepared Statements Architecture
- ProxySQL Cluster
- How to Configure ProxySQL for PostgreSQL for the First Time
- Authentication Methods
- How to Set Up ProxySQL Read/Write Split
- MCP Tables
- How to Configure ProxySQL for MySQL for the First Time
- Multi-Layer Configuration System
- Step-by-Step Installation Guide
- How to Configure ProxySQL for PostgreSQL for the First Time
- Configuring ProxySQL
- Authentication Methods
- SSL Support
- How to Set Up ProxySQL Read/Write Split
- Global Variables Quick Reference
- The Admin Schemas
- MCP Tables
- How to Configure ProxySQL for MySQL for the First Time
- ProxySQL Cluster
- MySQL Prepared Statements Architecture
- SSL Support
- Step-by-Step Installation Guide
- Multi-Layer Configuration System
- The Admin Schemas
- MySQL Prepared Statements Architecture
- Global Variables Quick Reference
- ProxySQL Cluster
- Authentication Methods
- MCP Tables
- How to Configure ProxySQL for MySQL for the First Time
- How to Configure ProxySQL for PostgreSQL for the First Time
- How to Set Up ProxySQL Read/Write Split
- MCP Tables
- MySQL Prepared Statements Architecture
- How to Set Up ProxySQL Read/Write Split
- Global Variables Quick Reference
- ProxySQL Cluster
- Step-by-Step Installation Guide
- How to Configure ProxySQL for PostgreSQL for the First Time
- Configuring ProxySQL
- SSL Support
- How to Configure ProxySQL for MySQL for the First Time
- MySQL Variables
- SSL Support
- Multi-Layer Configuration System
- MySQL Variables
- Step-by-Step Installation Guide
- How to Configure ProxySQL for MySQL for the First Time
- MCP Tables
- How to Set Up ProxySQL Read/Write Split
- How to Configure ProxySQL for PostgreSQL for the First Time
- ProxySQL Cluster
- Global Variables Quick Reference
- MySQL Prepared Statements Architecture
- How to Configure ProxySQL for MySQL for the First Time
- MCP Tables
- Authentication Methods
- ProxySQL Cluster
- How to Set Up ProxySQL Read/Write Split
- Multi-Layer Configuration System
- MySQL Prepared Statements Architecture
- How to Configure ProxySQL for PostgreSQL for the First Time
- Step-by-Step Installation Guide
- MySQL Prepared Statements Architecture
- PostgreSQL Tables
- How to Configure ProxySQL for MySQL for the First Time
- Authentication Methods
- MCP Tables
- Step-by-Step Installation Guide
- Multi-Layer Configuration System
- ProxySQL Cluster
- MySQL Variables
- How to Configure ProxySQL for PostgreSQL for the First Time
- Multi-Layer Configuration System
- ProxySQL Cluster
- MySQL Prepared Statements Architecture
- Step-by-Step Installation Guide
- MCP Tables
- How to Configure ProxySQL for MySQL for the First Time
- MySQL Variables
- Download and Install ProxySQL
- MySQL Prepared Statements Architecture
- ProxySQL Cluster
- How to Configure ProxySQL for MySQL for the First Time
- How to Configure ProxySQL for PostgreSQL for the First Time
- Download and Install ProxySQL
- MySQL Prepared Statements Architecture
- How to Configure ProxySQL for PostgreSQL for the First Time
- MySQL Prepared Statements Architecture
- Download and Install ProxySQL
- MySQL Prepared Statements Architecture
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Download and Install ProxySQL
- Step-by-Step Installation Guide
- Step-by-Step Installation Guide
- Cluster Commands
- The Admin Schemas
- RAG Overview
- How to Set Up ProxySQL Sharding
- MySQL Tables
- Security
- The ProxySQL Configuration File
- The Admin Schemas
- How to Set Up ProxySQL Sharding
- RAG Overview
- MySQL Tables
- Cluster Commands
- Security
- RAG Overview
- MySQL Prepared Statements Architecture
- Cluster Commands
- How to Set Up ProxySQL Sharding
- The ProxySQL Configuration File
- The Admin Schemas
- How to Set Up ProxySQL Sharding
- Cluster Variables
- PostgreSQL Tables
- Cluster Variables
- How to Set Up ProxySQL Sharding
- The Admin Schemas
- The ProxySQL Configuration File
- Step-by-Step Installation Guide
- RAG Overview
- The Admin Schemas
- How to Set Up ProxySQL Sharding
- The ProxySQL Configuration File
- Cluster Variables
- Cluster Variables
- The ProxySQL Configuration File
- How to Set Up ProxySQL Sharding
- MySQL Variables
- MySQL Prepared Statement Lifecycle
- RAG Overview
- Download and Install ProxySQL
- How to Set Up ProxySQL Sharding
- MySQL Variables
- Cluster Variables
- RAG Overview
- MySQL Prepared Statement Lifecycle
- RAG Overview
- Cluster Variables
- MySQL Prepared Statement Lifecycle
- Download and Install ProxySQL
- MySQL Variables
- RAG Overview
- MySQL Variables
- MySQL Variables
- RAG Overview
- MySQL Variables
- MySQL Variables
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- RAG Overview
- Prepared Statements
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statement Lifecycle
- MySQL Prepared Statements Architecture
- Troubleshoot the DuckDB plugin
- Architecture Overview
- Configuration Tables
- DNS Cache
- ProxySQL Threads
- Client Error Limit
- Multiplexing
- MySQL Binlog Reader
- DNS Cache
- ProxySQL Threads
- Architecture Overview
- Troubleshoot the DuckDB plugin
- MySQL Binlog Reader
- Client Error Limit
- MySQL Tables
- DNS Cache
- MySQL Binlog Reader
- Client Error Limit
- ProxySQL Threads
- Troubleshoot the DuckDB plugin
- Architecture Overview
- DNS Cache
- Client Error Limit
- ProxySQL Threads
- Mirroring
- Troubleshoot the DuckDB plugin
- MySQL Binlog Reader
- Architecture Overview
- MySQL Binlog Reader
- Configuration Tables
- Mirroring
- PostgreSQL Tables
- Architecture Overview
- Client Error Limit
- ProxySQL Threads
- Troubleshoot the DuckDB plugin
- Configuration Tables
- ProxySQL Threads
- MySQL Binlog Reader
- Mirroring
- PostgreSQL Tables
- Troubleshoot the DuckDB plugin
- Architecture Overview
- MySQL Binlog Reader
- Architecture Overview
- Troubleshoot the DuckDB plugin
- Mirroring
- Configuration Tables
- ProxySQL Threads
- PostgreSQL Tables
- PostgreSQL Extended Query
- ProxySQL Threads
- Configuration Tables
- Troubleshoot the DuckDB plugin
- Architecture Overview
- MySQL Binlog Reader
- Mirroring
- How to Configure ProxySQL for PostgreSQL for the First Time
- ProxySQL Threads
- Mirroring
- MySQL Binlog Reader
- Multi-Layer Configuration System
- Architecture Overview
- Troubleshoot the DuckDB plugin
- Architecture Overview
- Troubleshoot the DuckDB plugin
- MySQL Binlog Reader
- Configuring ProxySQL
- Multiplexing
- ProxySQL Threads
- MySQL Binlog Reader
- Configuration Tables
- Troubleshoot the DuckDB plugin
- Architecture Overview
- Configuration Tables
- Architecture Overview
- Troubleshoot the DuckDB plugin
- Architecture Overview
- Troubleshoot the DuckDB plugin
- Troubleshoot the DuckDB plugin
- Architecture Overview
- Architecture Overview
- Troubleshoot the DuckDB plugin
- Multi-Layer Configuration System
- RAG Overview
- Multi-Layer Configuration System
- Architecture Overview
- Architecture Overview
- RAG Overview
- RAG Overview
- RAG Overview
- RAG Overview
- PROXY Protocol Support
- Admin Backups
- Cache MySQL prepared-query results
- Hostgroup connection-pool statistics
- ProxySQL Design Goals
- Multiplexing
- Troubleshoot the DuckDB plugin
- ClickHouse Configuration
- PROXY Protocol Support
- Cache MySQL prepared-query results
- Multiplexing
- Hostgroup connection-pool statistics
- Version Checking
- ClickHouse Configuration
- Troubleshoot the DuckDB plugin
- PROXY Protocol Support
- ProxySQL Design Goals
- Hostgroup connection-pool statistics
- Troubleshoot the DuckDB plugin
- Multiplexing
- Cache MySQL prepared-query results
- ClickHouse Configuration
- Troubleshoot the DuckDB plugin
- Cache MySQL prepared-query results
- Multiplexing
- Configuration Tables
- PROXY Protocol Support
- ProxySQL Design Goals
- ClickHouse Configuration
- Hostgroup connection-pool statistics
- Troubleshoot the DuckDB plugin
- Multiplexing
- Cache MySQL prepared-query results
- Hostgroup connection-pool statistics
- ClickHouse Configuration
- ProxySQL Design Goals
- PROXY Protocol Support
- Multiplexing
- PROXY Protocol Support
- ProxySQL Design Goals
- Admin Backups
- Cache MySQL prepared-query results
- ClickHouse Configuration
- PROXY Protocol Support
- Multiplexing
- Admin Backups
- Version Checking
- ClickHouse Configuration
- Version Checking
- ClickHouse Configuration
- PROXY Protocol Support
- Configuration Tables
- Version Checking
- ClickHouse Configuration
- Multiplexing
- Configuration Tables
- PROXY Protocol Support
- Multiplexing
- Version Checking
- PROXY Protocol Support
- Multiplexing
- PROXY Protocol Support
- ProxySQL Design Goals
- Multiplexing
- PROXY Protocol Support
- ProxySQL Design Goals
- Multiplexing
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- Multiplexing
- Multiplexing
- PROXY Protocol Support
- PROXY Protocol Support
- Multiplexing
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- PROXY Protocol Support
- Killed Client Connection Warnings
- SQLite3 Server Variables
- SQLite3 Server Variables
- MCP Tables
- Killed Client Connection Warnings
- SQLite3 Server Variables
- Killed Client Connection Warnings
- MySQL Prepared Statements Architecture
- ClickHouse Configuration
- Killed Client Connection Warnings
- SQLite3 Server Variables
- Killed Client Connection Warnings
- ClickHouse Configuration
- How to Configure ProxySQL for PostgreSQL for the First Time
- RAG Overview
- Authentication Methods
- Global Variables
- Admin Variables
- Admin Commands
- MySQL Users Management
- MySQL Authentication
- MySQL Monitor Module
- Backend Server Configuration
- Galera Configuration
- AWS Aurora Configuration
- Query Rewrite
- Multiplexing
- MySQL Prepared Statements Architecture
- MySQL Prepared Statement Lifecycle
- MySQL Connection Pooling, Multiplexing & Caching
- Firewall Whitelist
- SSL Support
- ProxySQL Cluster
- Scheduler
- Prometheus Metrics
- Applying Query Rules in the PostgreSQL Extended Query Protocol
- MCP Server
- RAG Overview
- DuckDB overview