ProxySQL Installation

You can install the packages directly by first downloading from the Github Releases Page or use the RPM / DEB repositories to install from the official ProxySQL repositories.

ProxySQL packaged releases are available for the following operating system distributions:

  • RedHat & CentOS 6, 7, 8
  • Amazon Linux 1, 2
  • Debian 8, 9, 10, 11
  • Ubuntu 16, 18, 20, 22
  • Almalinux 8, 9 (NEW with 2.4.x)
  • OpenSUSE Leap 15 (NEW with v2.4.x)

If you are looking to run ProxySQL in Docker please check out the DockerHub repository for ProxySQL and more specifically if you are interested in running ProxySQL on Kubernetes you can find sample Helm charts in the ProxySQL Kubernetes repository (these can be exported to an operator if you are keen building your own).

Currently the officially maintained ProxySQL releases are:

ProxySQL Core 2.5.2 AMD 64-bit Packages

ProxySQL v2.5.2 x86_64 for RedHat & CentOS 6
ProxySQL v2.5.2 x86_64 for RedHat & CentOS 7
ProxySQL v2.5.2 x86_64 for RedHat & CentOS 8

ProxySQL v2.5.2 x86_64 for Debian 8
ProxySQL v2.5.2 x86_64 for Debian 9
ProxySQL v2.5.2 x86_64 for Debian 10
ProxySQL v2.5.2 x86_64 for Debian 11

ProxySQL v2.5.2 x86_64 for Ubuntu 14
ProxySQL v2.5.2 x86_64 for Ubuntu 16
ProxySQL v2.5.2 x86_64 for Ubuntu 18
ProxySQL v2.5.2 x86_64 for Ubuntu 20
ProxySQL v2.5.2 x86_64 for Ubuntu 22

ProxySQL v2.5.2 x86_64 for Almalinux 8
ProxySQL v2.5.2 x86_64 for Almalinux 9

ProxySQL v2.5.2 x86_64 for OpenSUSE Leap 15

ProxySQL Core 2.5.2 ARM 64-bit Packages

ProxySQL v2.5.2 ARM64 for RedHat & CentOS 7
ProxySQL v2.5.2 ARM64 for RedHat & CentOS 8

ProxySQL v2.5.2 ARM64 for Debian 9
ProxySQL v2.5.2 ARM64 for Debian 10
ProxySQL v2.5.2 ARM64 for Debian 11

ProxySQL v2.5.2 ARM64 for Ubuntu 18
ProxySQL v2.5.2 ARM64 for Ubuntu 20
ProxySQL v2.5.2 ARM64 for Ubuntu 22

ProxySQL v2.5.2 x86_64 for Almalinux 8
ProxySQL v2.5.2 x86_64 for Almalinux 9

ProxySQL v2.5.2 x86_64 for OpenSUSE Leap 15

ProxySQL Binlog Reader 2.1 AMD 64-bit Packages

ProxySQL Binlog Reader v2.1 x86_64 for RedHat & CentOS 7
ProxySQL Binlog Reader v2.1 x86_64 for RedHat & CentOS 8

ProxySQL Binlog Reader v2.1 x86_64 for Debian 9
ProxySQL Binlog Reader v2.1 x86_64 for Debian 10
ProxySQL Binlog Reader v2.1 x86_64 for Debian 11

ProxySQL Binlog Reader v2.1 x86_64 for Ubuntu 16
ProxySQL Binlog Reader v2.1 x86_64 for Ubuntu 18
ProxySQL Binlog Reader v2.1 x86_64 for Ubuntu 20

Installing ProxySQL Packages Directly

Released packages can also be found on ProxySQL’s Github Release Page, this includes all historic releases, debug packages and exotic builds. Just download a package and use your systems package manager to install it:

wget https://github.com/sysown/proxysql/releases/download/v2.5.2/proxysql_2.5.2-ubuntu20_amd64.deb
dpkg -i proxysql_2.5.2-ubuntu20_amd64.deb

Installing ProxySQL from the available repositories:

Ubuntu / Debian:

Adding the repository:

apt-get install -y --no-install-recommends lsb-release wget apt-transport-https ca-certificates gnupg
wget -O - 'https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/repo_pub_key' | apt-key add - 
echo deb https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/$(lsb_release -sc)/ ./ | tee /etc/apt/sources.list.d/proxysql.list
  • For 2.4.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.4.x/$(lsb_release -sc)/ ./ instead.
  • For 2.3.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.3.x/$(lsb_release -sc)/ ./ instead.
  • For 2.2.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.2.x/$(lsb_release -sc)/ ./ instead.

alternatively the repository key can be added without using apt-key

wget -nv -O /etc/apt/trusted.gpg.d/proxysql-2.5.x-keyring.gpg 'https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/repo_pub_key.gpg'

Installing ProxySQL:

apt-get update
apt-get install proxysql OR apt-get install proxysql=version

Red Hat / CentOS:

Adding the repository:

cat <<EOF | tee /etc/yum.repos.d/proxysql.repo
[proxysql_repo]
name= ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/centos/$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/repo_pub_key
EOF

Installing ProxySQL:

yum install proxysql OR yum install proxysql-version

Amazon Linux (AWS):

Adding the repository:

cat <<EOF | tee /etc/yum.repos.d/proxysql.repo
[proxysql_repo]
name=ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/centos/latest
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/repo_pub_key
EOF
  • For 2.4.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.4.x/centos/latest instead
  • For 2.3.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.3.x/centos/latest instead
  • For 2.2.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.2.x/centos/latest instead
  • For Amazon Linux 1, use baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.0.x/centos/6

Installing ProxySQL:

yum install proxysql OR yum install proxysql-version

Almalinux:

Adding the repository:

cat <<EOF | tee /etc/yum.repos.d/proxysql.repo
[proxysql_repo]
name=ProxySQL YUM repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/almalinux/latest
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/repo_pub_key
EOF

Installing ProxySQL:

yum install proxysql OR yum install proxysql-version

OpenSUSE Leap:

Adding the repository:

cat <<EOF | tee /etc/yum.repos.d/proxysql.repo
[proxysql_repo]
name=ProxySQL Zypper repository
baseurl=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/opensuse/latest
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/repo_pub_key
EOF

or

zypper addrepo -g -n 'ProxySQL Zypper repository' 'https://repo.proxysql.com/ProxySQL/proxysql-2.5.x/opensuse/$releasever_major' proxysql

Installing ProxySQL:

zypper --gpg-auto-import-keys install proxysql OR zypper --gpg-auto-import-keys install proxysql-version

Running ProxySQL with Docker:

Prepare a configuration file

The following basic configuration file should be sufficient for general development and testing purposes, this configuration will allow you to connect to your ProxySQL Docker container remotely using the second pair of admin_credentials e.g.: mysql -h127.0.0.1 -P16032 -uradmin -pradmin --prompt "ProxySQL Admin>"

# Config file contents referred to as "/path/to/proxysql.cnf"
datadir="/var/lib/proxysql"

admin_variables=
{
    admin_credentials="admin:admin;radmin:radmin"
    mysql_ifaces="0.0.0.0:6032"
}

mysql_variables=
{
    threads=4
    max_connections=2048
    default_query_delay=0
    default_query_timeout=36000000
    have_compress=true
    poll_timeout=2000
    interfaces="0.0.0.0:6033"
    default_schema="information_schema"
    stacksize=1048576
    server_version="5.5.30"
    connect_timeout_server=3000
    monitor_username="monitor"
    monitor_password="monitor"
    monitor_history=600000
    monitor_connect_interval=60000
    monitor_ping_interval=10000
    monitor_read_only_interval=1500
    monitor_read_only_timeout=500
    ping_interval_server_msec=120000
    ping_timeout_server=500
    commands_stats=true
    sessions_sort=true
    connect_retries_on_failure=10
}

Run ProxySQL in Docker

Make sure to specify the path to the file listed above in the following command:

$ docker run -p 16032:6032 -p 16033:6033 -p 16070:6070 -d -v /path/to/proxysql.cnf:/etc/proxysql.cnf proxysql/proxysql

NOTE: You will need to define a second pair of admin credentials to connect outside of your container.

For sample Helm charts on Kubernetes check out the ProxySQL Kubernetes Github Repository here.

Check out First steps after installing for useful post installation information

[/fusion_text][/fusion_builder_column][/fusion_builder_row][/fusion_builder_container]