ProxySQL MySQL MySQL · DBA · Setup

ProxySQLInstallation Guide

Step-by-step installation of ProxySQL on RHEL, CentOS, Rocky Linux, Ubuntu and Debian. Includes service setup and verification.

ProxySQL can be installed on major Linux distributions. It is available via official repositories provided by the ProxySQL team. Below are installation steps for RHEL/CentOS, Ubuntu/Debian, and manual binary installation.

BASH — Add Repo (RHEL/CentOS)
cat > /etc/yum.repos.d/proxysql.repo << EOF
[proxysql_repo]
name=ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.x.x/centos/\$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/repo_pub_key
EOF
BASH — Install
yum install proxysql -y
BASH — Start Service
systemctl enable proxysql
systemctl start proxysql
systemctl status proxysql
BASH — Add Repo (Ubuntu/Debian)
apt-get install -y --no-install-recommends lsb-release wget apt-transport-https gnupg
wget -nv -O /etc/apt/trusted.gpg.d/proxysql-2.x.x-repo.gpg \
  https://repo.proxysql.com/ProxySQL/proxysql-2.x.x/$(lsb_release -sc)/conf/proxysql-2.x.x-repo.gpg
echo "deb https://repo.proxysql.com/ProxySQL/proxysql-2.x.x/$(lsb_release -sc)/ ./" | \
  tee /etc/apt/sources.list.d/proxysql.list
BASH — Install
apt-get update
apt-get install proxysql -y
BASH — Start Service
systemctl enable proxysql
systemctl start proxysql
systemctl status proxysql

To install a specific version, download the RPM or DEB package directly:

BASH — Manual Install
# RHEL/CentOS
wget https://github.com/sysown/proxysql/releases/download/v2.5.5/proxysql-2.5.5-1-centos7.x86_64.rpm
rpm -ivh proxysql-2.5.5-1-centos7.x86_64.rpm

# Ubuntu
wget https://github.com/sysown/proxysql/releases/download/v2.5.5/proxysql_2.5.5-ubuntu20_amd64.deb
dpkg -i proxysql_2.5.5-ubuntu20_amd64.deb
BASH — Verify
# Check version
proxysql --version

# Check service status
systemctl status proxysql

# Check listening ports
ss -tlnp | grep proxysql

# Connect to admin interface
mysql -u admin -padmin -h 127.0.0.1 -P 6032 --prompt="ProxySQL Admin> "
💡 Note: Default Admin credentials: username = admin, password = admin. Change these immediately in production.
File / DirectoryPurpose
/etc/proxysql.cnfMain configuration file
/var/lib/proxysql/proxysql.dbSQLite database (persistent config)
/var/lib/proxysql/proxysql_errorlogError log file
/tmp/proxysql.logRuntime log
/usr/bin/proxysqlProxySQL binary
BASH — Service Management
systemctl start proxysql
systemctl stop proxysql
systemctl restart proxysql
systemctl reload proxysql
systemctl status proxysql
⚠ Warning: If you modify /etc/proxysql.cnf directly and restart ProxySQL, it will only read the file if the SQLite database does not exist. Always use the Admin interface to make changes.