Home

Mpampis Kostas edited this page Jan 17, 2017 · 10 revisions

Welcome to the ProxySQL wiki!

Table of context

Installation
Service Management
Multi-layer configuration system
Tables in Admin interface
Scheduler
Tables in main database (config)
  Runtime tables
Tables in disk database (disk)
Users configuration
Passwords management
Servers configuration
SSL configuration

FAQ

Installation

Available from https://github.com/sysown/proxysql/releases.
Just download and use the package manager to install it.
Ex:

wget https://github.com/sysown/proxysql/releases/download/v1.2.3/proxysql_1.2.3-ubuntu16_amd64.deb
dpkg -i proxysql_1.2.3-ubuntu16_amd64.deb

Service management

Once the software is installed, you can use service to start or stop it.

Start:

service proxysql start

Stop:

service proxysql stop

Upgrade

Install the new package and restart.
Ex:

wget https://github.com/sysown/proxysql/releases/download/v1.2.4.0923/proxysql_1.2.4-ubuntu16_amd64.deb
dpkg -i proxysql_1.2.4-ubuntu16_amd64.deb
service proxysql restart

Check version

$ proxysql --version
ProxySQL version 1.2.3, codename Truls

A debug version has _DEBUG in its version string. It is slower than non-debug version, but easier to debug in case of failures.

$ proxysql --version
Main init phase0 completed in 0.000146 secs.
ProxySQL version 1.2.3_DEBUG, codename Truls

Admin Interface

login as admin

Use a mysql client and connect using standard credentials and endpoint. Ex:

vagrant@ubuntu-14:~$ mysql -u admin -padmin -h 127.0.0.1 -P6032 --prompt='Admin> '

Output:

Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.5.30 (ProxySQL Admin Module)

Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

Admin>

list available schemas

Admin> SHOW DATABASES;
+-----+---------+-------------------------------+
| seq | name    | file                          |
+-----+---------+-------------------------------+
| 0   | main    |                               |
| 2   | disk    | /var/lib/proxysql/proxysql.db |
| 3   | stats   |                               |
| 4   | monitor |                               |
+-----+---------+-------------------------------+
4 rows in set (0.00 sec)