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:
- Supported OS — Linux: Ubuntu, Debian, CentOS, or RHEL
- System resources — Sufficient RAM, CPU, and disk space for your anticipated workload
- MySQL / MariaDB — Must be installed and running before configuring ProxySQL backends
- Network — Connectivity between ProxySQL and database servers with appropriate firewall rules
- Admin privileges — Required for installation and service management
- Package manager —
apt(Debian/Ubuntu) oryum(CentOS/RHEL); update before installing - DNS (optional) — Configure DNS if using hostnames rather than IP addresses for backend servers
Choosing an Installation Method
| From Source | Package Manager | |
|---|---|---|
| Latest version | ✓ Always | May lag behind |
| Customisation | Full control | Limited |
| Dependency handling | Manual | Automatic |
| Maintenance | Self-managed | Streamlined |
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.