ProxySQL Installation

You can install the packages directly by first downloading from the Github Releases Page or use the YUM / APT 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 AMI 1 & 2
  • Debian 8, 9 & 10
  • Ubuntu 16, 18 & 20

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.2.0 AMD 64-bit Packages

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

ProxySQL v2.2.0 x86_64 for Debian 8
ProxySQL v2.2.0 x86_64 for Debian 9
ProxySQL v2.2.0 x86_64 for Debian 10

ProxySQL v2.2.0 x86_64 for Ubuntu 14
ProxySQL v2.2.0 x86_64 for Ubuntu 16
ProxySQL v2.2.0 x86_64 for Ubuntu 18
ProxySQL v2.2.0 x86_64 for Ubuntu 20

ProxySQL Core 2.2.0 ARM 64-bit Packages

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

ProxySQL v2.2.0 ARM64 for Debian 8
ProxySQL v2.2.0 ARM64 for Debian 9

ProxySQL v2.2.0 ARM64 for Ubuntu 18
ProxySQL v2.2.0 ARM64 for Ubuntu 20

ProxySQL Binlog Reader 1.0.0 AMD 64-bit Packages

ProxySQL Binlog Reader v1.0.0 x86_64 for RedHat & CentOS 7
ProxySQL Binlog Reader v1.0.0 x86_64 for RedHat & CentOS 8

ProxySQL Binlog Reader v1.0.0 x86_64 for Debian 8
ProxySQL Binlog Reader v1.0.0 x86_64 for Debian 9
ProxySQL Binlog Reader v1.0.0 x86_64 for Debian 10

ProxySQL Binlog Reader v1.0.0 x86_64 for Ubuntu 16
ProxySQL Binlog Reader v1.0.0 x86_64 for Ubuntu 18
ProxySQL Binlog Reader v1.0.0 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.2.0/proxysql_2.2.0-ubuntu20_amd64.deb
dpkg -i proxysql_2.2.0-ubuntu20_amd64.deb

Installing ProxySQL from the available repositories:

Ubuntu / Debian:

Adding the repository:

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

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.2.x/centos/$releasever
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/repo_pub_key
EOF

Installing ProxySQL:

yum install proxysql OR yum install proxysql-version

Amazon Linux Servers (AMI):

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.2.x/centos/latest
gpgcheck=1
gpgkey=https://repo.proxysql.com/ProxySQL/repo_pub_key
EOF
  • For 2.0.x series releases use https://repo.proxysql.com/ProxySQL/proxysql-2.0.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

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