Skip to main content

Step-by-Step Installation Guide

This guide walks through installing ProxySQL from source or via a package manager, covering prerequisites, compilation, and initial startup.

Prerequisites

Before installation, ensure your system meets these requirements:

  1. Supported OS — Linux: Ubuntu, Debian, CentOS, or RHEL
  2. System resources — Sufficient RAM, CPU, and disk space for your anticipated workload
  3. MySQL / MariaDB — Must be installed and running before configuring ProxySQL backends
  4. Network — Connectivity between ProxySQL and database servers with appropriate firewall rules
  5. Admin privileges — Required for installation and service management
  6. Package managerapt (Debian/Ubuntu) or yum (CentOS/RHEL); update before installing
  7. DNS (optional) — Configure DNS if using hostnames rather than IP addresses for backend servers

Choosing an Installation Method

From SourcePackage Manager
Latest version✓ AlwaysMay lag behind
CustomisationFull controlLimited
Dependency handlingManualAutomatic
MaintenanceSelf-managedStreamlined

Installation from Source

Step 1: Clone the Repository

git clone https://github.com/sysown/proxysql.git
cd proxysql

Step 2: Install Build Dependencies

Debian / Ubuntu:

sudo apt-get install cmake libssl-dev libboost-dev \
libboost-program-options-dev libboost-filesystem-dev \
libboost-thread-dev libboost-regex-dev libboost-system-dev \
libmysqlclient-dev

Step 3: Compile and Install

make
sudo make install

Step 4: Verify

proxysql --version

Step 5: Start ProxySQL

Run in the foreground for testing:

proxysql -f -c /etc/proxysql.cnf

Run as a background service:

proxysql -c /etc/proxysql.cnf

Installation via Package Manager

Step 1: Install ProxySQL

Debian / Ubuntu:

sudo apt update
sudo apt install proxysql

CentOS / RHEL:

sudo yum install epel-release
sudo yum install proxysql

Official repository details: repo.proxysql.com

For full repository setup instructions see Download and Install ProxySQL.

Step 2: Start the Service

# systemd
sudo systemctl start proxysql

# SysVinit
sudo service proxysql start

Step 3: Verify

sudo systemctl status proxysql
proxysql --version

Step 4: Access the Admin Interface

Connect using a MySQL client:

mysql -u admin -padmin -h 127.0.0.1 -P 6032 --prompt='ProxySQLAdmin> '
note

Use 127.0.0.1 instead of localhost. The MySQL client uses a Unix socket for localhost, not a TCP connection.

Next Steps

See First Steps After Installing for post-installation configuration guidance.